I have created a FetchXML query which, doe to the join types it seems can only be developed and ran in XrmTooBbox. The query is designed to show me all opportunities that are related to accounts that are shared with 'me', and this partb nof it works well. I also need to display the current sales process stage name in the view so this is included in the following query and seems to produce the desired result.
Dynamics 365 cloud based, version 9.1.0000.21347
Here is the fetch XML:
<fetch version="1.0" output-format="xml-platform" mapping="logical" count="50" >
<entity name="opportunity" >
<attribute name="name" />
<attribute name="estimatedvalue" />
<attribute name="estimatedclosedate" />
<order attribute="estimatedclosedate" descending="false" />
<order attribute="cpc_weightedrevenue" descending="false" />
<filter type="and" >
<condition attribute="statecode" operator="eq" value="0" />
</filter>
<attribute name="cpc_deliverydate" />
<attribute name="ownerid" />
<attribute name="cpc_projecttype" />
<attribute name="cpc_weightedrevenue" />
<attribute name="cpc_estimatedclosureyear" />
<attribute name="cpc_estimatedclosuremonth" />
<attribute name="cpc_estimateconversiondate" />
<attribute name="cpc_liklihoodofconversion" />
<attribute name="parentaccountid" />
<attribute name="opportunityid" />
<link-entity name="account" from="accountid" to="parentaccountid" >
<link-entity name="principalobjectaccess" from="objectid" to="accountid" link-type="inner" >
<link-entity name="systemuser" from="systemuserid" to="principalid" link-type="inner" >
<filter type="and" >
<condition attribute="systemuserid" operator="eq-userid" />
</filter>
</link-entity>
</link-entity>
<!--<attribute name="name" />-->
</link-entity>
<link-entity name="opportunitysalesprocess" from="opportunityid" to="opportunityid" >
<attribute name="activestageid" alias="CurrentStage" />
</link-entity>
</entity>
</fetch>
Problem is, if I use this in XrmToolBox View designer, no value is shown for the 'CurrentStage' (alias) column and I can't see why.
Is this is a limitation of dynamics CRM or can anyone suggest a better/alternative way to get the desired result?
Many thanks
Chris.