Using special Dynamics CRM date operators in Flow!

Home / Power Platform / Power Automate / Using special Dynamics CRM date operators in Flow!
CRM Date Operators

Using the fantastic Advanced Find feature, we are able to use some useful operators to save your time like : InFiscalYear, Last7Days…
These operators are named “Query functions” and can be used as a filter criteria in a query.
You can find the full list here : Web API Query Function Reference.

Imagine a scenario where you want to retrieve records created on the last 3 days! Basically, if you use the Advanced Find you will do something like that:

Advanced Find using Query Function as a filter.
Advanced Find using Query Function as a filter.

Using an ODATA Query you can also implement it:

https://org.crm4.dynamics.com/api/data/v9.1/ava_entity?$select=ava_field&$filter=Microsoft.Dynamics.CRM.LastXDays(PropertyName=’createdon’,PropertyValue=2)

As you can imagine, you can also use it in a Flow! You just have to add this statement into the “Filter Query”:

Flow with a Query Function filter
Flow with a Query Function filter

Then you can test your flow and see records retrieved:

Leave a Reply

Your email address will not be published.