Announcements
Good morning,
How can i add dynamic query range to one of field in query to as of today date
(<=today()) as this is not working.
Please provide me solution for this.
Regards,
Have a great day.
Hi
you can use (lessThanDate(0))
check CustOpenInvoicesPastDueListPage query in due date range
Hi Sir,
You can try the SysQueryRangeUtil class.
More details,please read these :
https://docs.microsoft.com/en-us/dynamics365/unified-operations/fin-and-ops/get-started/advanced-filtering-query-options
https://www.to-increase.com/business-integration/blog/ax-dynamic-query-ranges
Note that both previous replies are about the same approach. If you wanted to use currentDate() method mention in the second reply, you would use the syntax shown in the first reply (currentDate()). It just wouldn't handle the operator for you.
All such methods used to be defined in SysQueryRangeUtil mentioned by Blue Wang (and both currentDate() and lessThanDate() are declared there) but it's not true anymore in F&O. They may be defined in any class, just decorated with QueryRangeFunctionAttribute.
Thanks Martin.
I'll learn more about it.
Share:
QueryRangeFunctionAttribute corrected by Martin.
https://lennartconrad.wordpress.com/2016/11/29/how-to-extend-sysqueryrangeutil-in-dynamics-365-for-operations-aka-dynamics-ax7/
[View:https://community.dynamics.com/365/financeandoperations/b/ievgensaxblog/posts/ax-7-queryrangefunctionattribute-as-a-replacement-for-sysqueryrangeutil:750:50]
Hi martin,
Thank you for the reply.
But in d365fo how we can use in dynamic query range as value.?
Regards
It's what we discussed in all the replies above.
Here you have yet another article about the same thing: Using dynamic query values (SysQueryRangeUtil) in Dynamics AX.
Dear Martin,
The point here is i cannot find in all replies or in the site you mentioned what is value that i can give in query range like
Range - field - properties - value - Today()
(To get only today related records)
what should i use for <=Today()
To get as of Today result
I think you got the answer already in the very first reply: (lessThanDate(0)). Please go and try it.
Later you can return to the articles and try to understand all the options available to you, which will allow you to choose the right method by yourself in future.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to a top community star!
In our never-ending quest to help the Dynamics 365 Community members get answers faster …
Welcome to the next edition of the Community Platform Update. This is a status …
Stay up to date on forum activity by subscribing.