Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 2Discover the latest updates and new features releasing from October 2021 through March 2022.
2021 release wave 2 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
We have several issues with how AX 2009 handles date and time stamping transactions due to the fact the time difference between where our AX application server is located and one goup of users.
The time difference is 9 hours. During the first couple hours of the users business day the issue we're seeing is the following:
1. they create a sales order which is stamped using the session date and time for that user.
2. If they advance the order to the packing slip stage, we have noticed that the packing slip is using the AOS date and time which in this case is yesterday.
3. in the end it looks like the order was shipped before the order was actually created.
4. This same issues with date and time occurs during our period close process where transactions are not permitted for the first few hours of the users business day because posting date used is the AOS date which is still in the previous period.
As we add addiitional user groups, this issue will only become more apparent. Are there ways to manage this other than telling the business sorry, you can't run transaction for the first few hours of your business day or having them manually change the dates for two hours every day?
We are planning to go with 1 AOS .
What do you suggest in AX 2012 R3 ?
As I am not familiar with AX2012 R3 (and do not have access to a copy), do the following
1. Start with the localDate() code above and replace systemDateGet() calls in code with a call to localDate().
2. Test and let me know of any unusable behaviour.
I would suggest configuring your AX app server to match the date/time of your users.
That would be the best option I believe. Other then that, you could modify AX to set date and times of your orders to that of your app server but that would be a heavy modification and most likely not recommended. Look into UTCDateTime functionality. Every date/time that goes into fields is converted to the users preferred time zones. So in actuality, the two matchup but you don't see that in the user interface. Read the below link for some good info:
Also, there is perhaps a way to turn off the conversion but it would still leave a problem where you would see an order created now that looks like it was created 9 hours ago.
Hope this helps somewhat.
The solution I implemented is system wide, not just prod.
Here is the code I use (I have placed inside the global class).
static date localDate()
permission = new InteropPermission(InteropKind::CLRInterop);
utcDate = System.DateTime::get_UtcNow();
axUtcDate = DateTimeUtil::anyToDateTime(CLRInterop::getAnyTypeForObject(utcDate));
localDate = DateTimeUtil::applyTimeZoneOffset(axUtcDate, DateTimeUtil::getCompanyTimeZone());
You will notice that the UTCDateTime is converted back into a date in the return call.
Everywhere I want to use local dates you need to convert the code from using SystemDateGet() to LocalDate().
Business Applications communities