Case description:
You need to add a custom fixed filter by column Type to the Contact section.
Algorithm of realization:
- Create replacing client schema for your section.
- Create localizable strings which will contain captions of the filter and menu item.
- Create image which will contain image of the filter.
-
Source code of the "ContactSectionV2" :
define("ContactSectionV2", [], function() {
return {
entitySchemaName: "Contact",
methods: {
initFixedFiltersConfig: function () {
var fixedFilterConfig = {
entitySchema: "ContactType",
filters: [
{
name: "TypeFilter",
columnName: "Type",
caption: this.get("Resources.Strings.ContactTypeFilterCaption"),
dataValueType: this.Terrasoft.DataValueType.LOOKUP,
appendCurrentContactMenuItem: false,
addNewFilterCaption: this.get("Resources.Strings.SelectContactTypeCaption"),
hint: this.get("Resources.Strings.SelectContactTypeCaption"),
buttonImageConfig: this.get("Resources.Images.ContactTypeFilterImage")
}
]
};
this.set("FixedFilterConfig", fixedFilterConfig);
}
}
};
});The result would be:
