We have a scenario where in we need to dynamically set a custom filter of contact to customer lookup but the problem is that it displays account view only. When we add a new custom filter to remove account view it displays custom contact which is correct, but contact custom view does not comes when we click on look for more records. Is there a way on how to remove the previously added custom filter on a customer lookup so that account view does not appear and contact custom view appears?
To remove account view we have used following code:
var account_filter = "<filter type='and'>" +
"<condition attribute='accountid' operator='null' />" +
"</filter>";
Xrm.Page.getControl("customerid").addCustomFilter(account_filter, "account");
Thanks in advance.