I am using following code snippet to restrict Customer lookup on Order form to populate 'Contacts' automatically, it is working fine in CRM2016 but in D365 it automatically populate 'Accounts'.
Any suggestion to make customer lookup to show 'Contacts' automatically.
function defaultcustomer(){ Xrm.Page.getControl("customerid").addPreSearch(addFilter); } function addFilter() { var customerAccountFilter = "<filter type='and'><condition attribute='accountid' operator='null' /></filter>"; Xrm.Page.getControl("customerid").addCustomFilter(customerAccountFilter, "account"); }
*This post is locked for comments