Sunday, 17 April 2016

Last Fiscal Period - FetchXML Query

The following example shows a FetchXML expression that finds all orders fulfilled in the last fiscal period, according to the organization’s fiscal year settings.
For example, if the organization uses fiscal months, the query returns orders fulfilled in the last fiscal month. If the organization uses fiscal quarters, the query returns orders fulfilled in the last fiscal quarter. If the organization uses fiscal semesters, orders fulfilled in the last fiscal semester are returned.
  1. <fetch>
  2. <entity name="order">
  3. <attribute name="name"/>
  4. <filter type="and">
  5. <condition attribute="datefulfilled" operator="last-fiscal-period"/>
  6. </filter>
  7. </entity>
  8. </fetch>
Explanation
To create last fiscal period FetchXML query:
  • In condition attribute set operator keyword to last-fiscal-period.
    <condition attribute="datefulfilled" operator="last-fiscal-period"/>
- See more at: http://msxrmtools.com/fetchxml/reference

No comments:

Post a Comment