How to transfer 'Owner filter' from Activities to another Section?
Is it possible transfer 'Owner filter' from Activities to another Section?
Like
Hi Harry,
See an example in the ActivitySectionV2 scheme in NUI package.
I think you need to add initFixedFiltersConfig method to the section page:
initFixedFiltersConfig: function() {
var fixedFilterConfig = {
entitySchema:this.entitySchema,
filters: [
{
name: "Owner",
caption: this.get("Resources.Strings.OwnerFilterCaption"),
columnName:"Owner",
defValue:this.Terrasoft.SysValue.CURRENT_USER_CONTACT,
dataValueType:this.Terrasoft.DataValueType.LOOKUP,
filter:BaseFiltersGenerateModule.OwnerFilter,
appendFilter:function(filterInfo) {
varfilter;
if(filterInfo.value && filterInfo.value.length > 0) {
filter = Terrasoft.createColumnInFilterWithParameters(
"[ActivityParticipant:Activity].Participant",
filterInfo.value);
}
returnfilter;
}
}
]
};
this.set("FixedFilterConfig",fixedFilterConfig);
}
And then call it on init:
...
this.initFixedFiltersConfig();
...
Please note, that this example selects Owners by Activity Participant object, so you will have to adapt the method for your Section odbject.