Need to restrict "customerid" field to only show accounts and not contact, accounts on the opportunity entity for CRM 2016 Online. Tried the following code for JS but its not working:
enduserFilterAccount: function () {
debugger;
if (XrmAttribute.exists("customerid")) {
Xrm.Page.getControl("customerid").addPreSearch(addFilter);
}
},
addFilter: function(){
var filter = "<filter type='and'>"+
"<condition attribute='contactid' operator='null' />"+
"</filter>";
Xrm.Page.getControl("customerid").addCustomFilter(filter, "contact");
},
Kindly help if you have any pointers.
*This post is locked for comments