
Afternoon all
I'm trying to build a report that shows An Opportunity and then lists all the quotes and the products in the quotes. Normally i would build something in CRM and then download the report into VS2012 to play with. But i can't seem to make the last little jump from quotes to the products.
I can list all quotes in the opportunity i'm in but how do i get the products as well
Many Thanks
Dan
*This post is locked for comments
I have the same question (0)Hi Dandare,
Its because in CRM Advanced Find. The Opportunity can only reach entities one level deep.
So Opportunity > Quote. But with some messing around with the FetchXML you can reach the Quote products as well:
What I do is just link all the entities together and add filters for the values you want to see, then just change them from a filter to attributes in the FetchXML:
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" >
<entity name="opportunity" >
<attribute name="name" />
<attribute name="estimatedvalue" />
<attribute name="opportunityid" />
<attribute name="psd_revenuetype" />
<attribute name="estimatedclosedate" />
<attribute name="description" />
<attribute name="parentaccountid" />
<attribute name="parentcontactid" />
<attribute name="actualvalue" />
<attribute name="actualclosedate" />
<attribute name="psd_originatingopportunityid" />
<attribute name="ownerid" />
<order attribute="name" descending="true" />
<filter type="and" >
<condition attribute="opportunityid" operator="eq" uiname="Test" uitype="opportunity" value="{1E9ADB04-7A68-E711-8100-5065F38B4671}" />
</filter>
<link-entity name="quote" from="opportunityid" to="opportunityid" alias="aa" >
<attribute name="quoteid" />
<link-entity name="quotedetail" from="quoteid" to="quoteid" alias="ab" >
<attribute name="productid" />
<attribute name="baseamount" />
<attribute name="quantity" />
</link-entity>
</link-entity>
</entity>
</fetch>
Alternatively you can just use XRMToolBox and download fetchXMLBuilder:
http://fxb.xrmtoolbox.com/