Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Unanswered

Issue with datetime field with User Local Behavior

Posted on by
Hi

I am facing issue with datetime field behavior.
Field: contoso_applicationDate 
DataType: DateTime (date only)
Behaviour: UserLocal
Logged User TimeZone is JST which is UTC+9

I have a plugin registered on Create event PreValidation. I am getting ontoso_applicationDate from target in plugin.
Issue:
1. When JST user is creating record from FORM with value of contoso_applicationDate  as 01 Jan 2024 then in Pevalidation plugin we are receiving value of contoso_applicationDate as 31 Dec 2023 3:00:00 PM. This is fine because the CRM is converting JST date to UTC date.
Logged in user JST creation of  contoso_applicationDate : 1/1/2024 00:00:00
Prevalidation Plugin value of contoso_applicationDate : 31/12/2023 15:00:00

Where as the plugin when user is creating record through import then the behavior is not same as expected.
2. When JST user is creating record using import file with value of contoso_applicationDate  as 01 Jan 2024 then in Pevalidation plugin we are receiving value of contoso_applicationDate  as 01 Jan 2024 12:00:00 AM. 
Logged in user JST creation of  contoso_applicationDate : 1/1/2024 00:00:00
Prevalidation Plugin value of contoso_applicationDate : 1/1/2024 00:00:00
This is not expected behavior can you please help in this and let me know the reason for this behavior?

Thanks in advance!

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.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans