Hello community,
I have a detail DocListInFinApp in Application Page and I want to add a fixed filter to the detail based on application current stage. Is there a way to add a fixed filter to the detail to only show specific documents.
I have implemented the following code to test the functionality
methods: {
onEntityInitialized: function() {
this.callParent(arguments);
this.initFixedFiltersConfig();
},
// Initializes the fixed filters.
initFixedFiltersConfig: function() {
// Creating a Configuration Object.
var fixedFilterConfig = {
// The schema of the section object is specified as an object schema for fixed filters.
entitySchema: "DocListInFinApp",
// Array of filters.
filters: [
// Owner filter.
{
// The name of the filter.
name: "StageFilter",
// Filter header.
caption: "StageFilter",
// Filter the data from the [Owner] column.
columnName: "DocumentListStage",
// Current user contact is specified as default value.
// Value is received from the system setting.
defValue:"69CF135A-9D15-4500-A0D1-E553A7BD5620",
// The data type – lookup.
dataValueType: this.Terrasoft.DataValueType.LOOKUP,
// Filter.
filter: BaseFiltersGenerateModule.StageFilter
}
]
};
// A link to the configurational object is assigned to the [FixedFilterConfig] column.
this.set("FixedFilterConfig", fixedFilterConfig);
}
}