Hi all,
i am using addCustomFilter() and the addPreSearch method to filter the "account" lookup in the opportunity entity, but it only works when i click the search button and when i try to type in field the filter doesn't work. is this normal?
OpportunityTest.setParentAccountIdFilter function is set in the form Onload event handler.
var OpportunityTest = window.OpportunityTest || {}; OpportunityTest.setParentAccountIdFilter = function (executionContext) { // get the form context formContext = executionContext.getFormContext(); formContext.getControl("parentaccountid").addPreSearch(OpportunityTest.filterCustomerAccounts); } OpportunityTest.filterCustomerAccounts = function () { // Only show accounts with the type 'marketingonly'equal to yes var customerAccountFilter = "" "" " "; formContext.getControl("parentaccountid").addCustomFilter(customerAccountFilter, "account"); }