Hi Experts,
I have a lookup Field contain both account and Contact Records just like Customer Field in Case Form. I want to Show Records of only account with RelationShip type is Customer . Then What we prefer to filter that lookup field like using addCustomFilter but How we create that filter condition in that.
Thanks in advance.
Ajyendra
*This post is locked for comments
Hi Pawar Pravin ,
Thanks for the reply.
But I figure out the solution by myself
var contactFilter = "<filter type='and'><condition attribute='contactid' operator='null' /></filter>"; var accountFilter = "<filter type='and'><condition attribute='customertypecode' operator='eq' value='3' /></filter>"; Xrm.Page.getControl("customerlookupfield").addCustomFilter(contactFilter, "contact"); Xrm.Page.getControl("customerlookupfield").addCustomFilter(accountFilter, "account");
]Thanks
Ajyendra
If this answer is helpful. Please Mark as Verified.
Have you checked JS mentioned in below url ?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156