I have a requirement to fetch all the activities from custom entities and have it roll up into a parent custom entity. I tried to use the cascade all option on the relationships but I guess that dosnt work for custom entities for whatever reason. So Im stuck trying to code it. I have been trying to get the fetchXML working but I'm having difficulty linking two different entities and I'm not sure what is wrong. Im using the XRMToolBox FetchXML builder and when I run it it just tells me its invalid XML. I'm not sure what Im doing wrong. Any help is appreciated!
Salestrip being parent, Customer Visit being child and Account Affected being grandchild
XML below.
<fetch top="50" >
<entity name="activitypointer" >
<attribute name="createdon" />
<attribute name="activityid" />
<attribute name="prioritycode" />
<attribute name="statecode" />
<link-entity name="salestrip" from="salestripid" to="regardingobjectid" link-type="outer" >
<link-entity name="customervisit" from="originatingtrip" to="salestripid" link-type="outer" >
<filter type="and" >
<condition attribute="customervisitid" operator="not-null" />
</filter>
</link-entity>
<link-entity name="accountaffected" from="originatingtrip" to="salestripid" link-type="outer" >
<filter type="and" >
<condition attribute="originatingvisit" operator="not-null" />
</filter>
</link-entity>
</link-entity>
</entity>
</fetch>
*This post is locked for comments
I have the same question (0)