there is a lead entity and the query is if we select an account from the lookup field , there the contact lookup field should also show the related contacts in the lookup field.
*This post is locked for comments
thanks man..!! finally the code is working..
Hi Anant,
I'm pretty sure this functionality is available out of the box, you just need to configure related records filtering for the contacts lookup on that form:
www.powerobjects.com/.../how-to-use-dependent-lookups-for-dynamics-crm-201320152016
Hi Anant ,
You can write a java script to show desired records view.
function preFilterLookup() { Xrm.Page.getControl("parentaccountid").addPreSearch(function () {
addLookupFilter();
});
}
function addLookupFilter() {
var email = Xrm.Page.getAttribute("emailaddress1").getValue();
if (email != null) {
fetchXml = "<filter type='and'><condition attribute='emailaddress1' operator='eq' value='" + email + "' /></filter>"; Xrm.Page.getControl("parentaccountid").addCustomFilter(fetchXml);
}
}
Please mark as verified if this has helped you.
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,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156