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>";