I have a a lookup field on Project Task (part of PSA) that looks up to Project Task.
I need a list of records that are the lowest level, i.e. they have no child Project Tasks.
I have followed this article before and it works well where the parent and children are different entity types: http://celedonpartners.com/blog/microsoft-dynamics-finding-parent-records-with-no-child-records-using-xrmtoolbox-and-fetchxml/
However I'm now getting and error on my condition that it doesn't know which entity to filter on. Can I use an alias or something to reference the child?
My XML:
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true"> <entity name="msdyn_projecttask"> <attribute name="msdyn_subject" /> <order attribute="msdyn_scheduledstart" descending="false" /> <link-entity name="msdyn_projecttask" from="msdyn_parenttask" to="msdyn_projecttaskid" alias="aa" link-type="outer"> </link-entity> <filter type="and"> <condition entityname="msdyn_projecttask" attribute="msdyn_projecttaskid" operator="null" /> </filter> </entity> </fetch>
*This post is locked for comments