Good Day,
I have been trying to add a filter on Product Lookup on OpportunityProductDetailV2 but does not seem to work. Anyone knows what my problem is? Here's my current code.
Thank You
define("OpportunityProductDetailV2", [], function() {
return {
entitySchemaName: "OpportunityProductInterest",
attributes: {},
methods: {
prepareProductLookup: function(config) {
debugger;
var filterGroup = this.Terrasoft.createFilterGroup();
filterGroup.add("ProductNameFilter", this.Terrasoft.createColumnFilterWithParameter(
this.Terrasoft.ComparisonType.CONTAIN, "Name", "Test"
));
config.filters.add("customProductFilter", filterGroup);
this.callParent(arguments); // Call the parent method if needed
}
},
diff: /**SCHEMA_DIFF*/ [
{
"operation": "merge",
"name": "Product", // Lookup field to which the filter is applied
"values": {
"bindTo": "Product",
"controlConfig": {
"prepareList": {
"bindTo": "prepareProductLookup" // Binding the method to prepare lookup with filters
}
}
}
}
]/**SCHEMA_DIFF*/
};
});