how to filter search in subgrid address based on lookup field end customer?
Thanks,
*This post is locked for comments
how to filter search in subgrid address based on lookup field end customer?
Thanks,
*This post is locked for comments
Regarding Object ID is a field of the activity entity.
You should change the FetchXML to that of the address entity based on what criteria you need to filter the address entity depending on the end customer field.
function funName_onload()
{
var grid = document.getElementById('LeadActivity');
if (grid ==null)
{
setTimeout('funName_onload()', 2000);
}
else {
var lookupfield = new Array;
lookupfield = Xrm.Page.getAttribute("originatingleadid").getValue();
if (lookupfield != null) {
var lookupid = lookupfield[0].id;
}
else {
return;
}
var fetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>";
fetchXml += "<entity name='activitypointer'>";
fetchXml += "<attribute name='regardingobjectid' />";
fetchXml += "<filter type='and'>";
fetchXml += "<condition attribute='regardingobjectid' operator='eq' value='" + lookupid + "' />";
fetchXml += "</filter>";
fetchXml += "</entity>";
fetchXml += "</fetch>";
grid.control.SetParameter("fetchXml", fetchXml);
grid.control.Refresh();
}
}
Can you explain? . What 'regardingobjectid' it?
Hi Ferdiansah,
Please refer the links below.
bernado-nguyen-hoan.com/.../apply-filtering-to-subgrids-inline-lookup-in-crm/
Hope this helps.
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,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156