locked
FetchXML opportunity RRS feed

  • Question

  • Hi,

    i used the fetchXML query :>

    <fetch distinct="false" mapping="logical" aggregate="true" output-format="xml-platform" >
        <entity name="opportunity" >
            <attribute name="actualvalue" alias="opportunity_sum" aggregate="sum" />
            <attribute name="createdbyname" alias="Commercial" groupby="true" />
            <filter type="and" >
                <condition attribute="statecode" operator="eq" value="1" />
            </filter>
            <filter type="and" >
                <condition attribute="actualclosedate" operator="in-fiscal-period" value="" />
            </filter>
        </entity>
    </fetch>
    my CRM fiscal year settings : Year

    i need to get the actual value sum of opportunity closed as won for each sales in the quarter 1, quarter 2, quarter3 and quarter 4 

    any idea ?


    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

    Thursday, April 9, 2015 10:04 AM

Answers

  • I don't have a good answer for you, but I can point you to an excellent tool that can help you work though this.

    http://www.xrmtoolbox.com/

    XRM Toolbox has a number of useful tools in it for managing CRM, and more importantly it has a FetchXML builder that you can use to test the FetchXML until you get the results you want.


    Monday, April 13, 2015 7:34 PM
  • thanks chris, i used xrmtoolbox, i created function in javascript to solve this, thanks. 

    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

    • Marked as answer by Ammar.Zaied Tuesday, April 14, 2015 8:07 AM
    Tuesday, April 14, 2015 8:07 AM

All replies

  • I don't have a good answer for you, but I can point you to an excellent tool that can help you work though this.

    http://www.xrmtoolbox.com/

    XRM Toolbox has a number of useful tools in it for managing CRM, and more importantly it has a FetchXML builder that you can use to test the FetchXML until you get the results you want.


    Monday, April 13, 2015 7:34 PM
  • thanks chris, i used xrmtoolbox, i created function in javascript to solve this, thanks. 

    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

    • Marked as answer by Ammar.Zaied Tuesday, April 14, 2015 8:07 AM
    Tuesday, April 14, 2015 8:07 AM