
I have xml with multiple linked entities and I need to populate my custom view with the results, I read about it online but not sure what is the best solution. how I do that?
- Xrm.Page.getControl("associatedproduct").addCustomFilter(fetchXml) - doesn't work.
"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>"+
"<entity name = 'product'>"+
"<attribute name='name'/>"+
"<attribute name='productnumber'/>"+
"<attribute name='subjectid'/>"+
"<attribute name='statecode'/>"+
"<attribute name='productid'/>"+
"<order attribute='productnumber' descending='false'/>"+
"<link-entity name='pricelistitem' from='productid' to='productid' alias='ae'>"+
"<link-entity name='pricelevel' from='pricelevelid' to='pricelevelid' alias='af'>"+
"<link-entity name='entit' from='accountpricelistid' to='pricelevelid' alias='ag'>"+
"<link-entity name='account' from='accountid' to='accountid' alias='ah'>"+
"<filter type='and'>"+
"<condition attribute='accountid' operator='eq' uitype='account' value='" + accId+"' />"+
"</filter>"+
"</link-entity>"+
"</link-entity>"+
"</link-entity>"+
"</link-entity>"+
"</entity>"+
"</fetch>";
Hi partner,
Please check the following points.
1.Can this fetch xml get the correct result? Did you try it with advanced find or other tools?
Please check if this entity exists.
And you could add your fetchxml to toolbox Fetch XML Builder to check if the fetch xml is correct and could get the result you want.
2.What's the lookup field you want to add this fetch xml? Normal look up field or "Party List"?
Best Regards,
Leo