Sunday, 17 April 2016

in-fiscal-period-and-year Query - FetchXML Query

The following example shows a FetchXML expression that finds all orders fulfilled in period three of fiscal year 2013, according to the organization’s fiscal year settings. If the organization uses fiscal months, the query returns results from month three. If the organization uses fiscal quarters, the query returns results from quarter three. If the organization uses fiscal semesters, no results are returned; there are only two semesters, and the value supplied is therefore out-of-range.
  1. <fetch>
  2. <entity name="order">
  3. <attribute name="name"/>
  4. <filter type="and">
  5. <condition attribute="datefulfilled" operator="in-fiscal-period-and-year">
  6. <value>3</value>
  7. <value>2013</value>
  8. </condition>
  9. </filter>
  10. </entity>
  11. </fetch>
Explanation
To create in-fiscal-period-and-year FetchXML query:
  • In condition attribute set operator keyword to in-fiscal-period-and-year.
    <condition attribute="datefulfilled" operator="in-fiscal-period-and-year">
    
  • Specify value of fiscal period in value attribute of condition tag.
    <value>3</value>
    
  • Specify value of fiscal year in another value attribute of condition tag.
    <value>2013</value>
- See more at: http://msxrmtools.com/fetchxml/reference

No comments:

Post a Comment