fetch top="50">
<entity name="msdyn_resourcerequirement">
<attribute name="msdyn_territory" />
<filter>
<condition attribute="msdyn_workorder" operator="eq" value="274b9ecf-8777-ed11-81ab-6045bd8c5107" uitype="msdyn_workorder" />
</filter>
<link-entity name="msdyn_resourceterritory" from="msdyn_territory" to="msdyn_territory" link-type="outer" alias="territory">
<attribute name="msdyn_resource" />
<link-entity name="bookableresource" from="bookableresourceid" to="msdyn_resource" link-type="inner" alias="brb">
<attribute name="name" />
<attribute name="resourcetype" />
<attribute name="bookableresourceid" />
<filter>
<condition attribute="resourcetype" operator="eq" value="8" />
</filter>
<link-entity name="bookableresourcegroup" from="parentresource" to="bookableresourceid" link-type="outer" alias="brbgroup">
<attribute name="name" />
<attribute name="fromdate" />
<attribute name="todate" />
<filter>
<condition attribute="statuscode" operator="eq" value="1" />
</filter>
<link-entity name="bookableresource" from="bookableresourceid" to="childresource" link-type="outer" alias="eng">
<attribute name="name" />
</link-entity>
</link-entity>
</link-entity>
</link-entity>
</entity>
</fetch>