Hi everyone,
I am creating an AOT query. And in this query i drag some datasources.
I have a field StartDateTime on one of those datasources which should have a fixed datetime value. It's of type utcDateTime.
I tried using the SysQueryRangeUtil class by adding a custom method. The method returns a string and accepts a utcDateTime parameter. In the method I return SysQuery::value(parameter). I also tried without a parameter, simply returning the fixed datetime.
Next I fill the value property of the range with (customMethod(2016-10-19T00:00:00)) but it doesn't work. Invalid range... Infolog message. I also tried the US time notation 10/19/2016 12:00:00 pm, but that doesn't work either.
I also tried adding these datetime values without the custom method. And then the US notation is working. So no problem here, but if I export the query to an AOS which is running on a system with 24h notation regional settings the range value is replaced to double quotes "". If I manually re-enter the same but in 24h notation on that server, it also doesn't complain. But I don't choose what the regional settings are, it should work on all systems independent of those settings.
So what is the right approach here? I didn't find any standard AX queries which have queries with such ranges.
I know I can also create a query in x++ and use the extended range query. But i need this query inside a view as a datasource. Then again I could use a computed column, but I would think that if all these things are possible through coding that they are also possible by creating the AOT query.
And looking on Google it provides me all information about the extended range notation within x++, but not the AOT counterpart.
Hopefully you guys can help me out.
Kind regards,
Vincent Verweij
*This post is locked for comments