I am trying to apply a custom filter on a lookup attribute.
The fetchXML returns correct values then why addCustomFilter is not working? I have turned off the related records filtering as well.
I have tried everything. The function fires up and doesn’t throw any errors.
function filterClassificationValues() {
var fetchXML = "<filter type='and'><condition attribute='db_mailboxname' operator='eq' value='{guid of the record}' /></filter>";
formContext.getControl("nameOfTheField").addCustomFilter(fetchXML, "entityName");
}
//this function is called On Load
function AddPreSearch(executionContext) {
formContext = executionContext.getFormContext();
formContext.getControl("nameOfTheField").addPreSearch(filterClassificationValues);
}
New contributor
SristiJain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.