Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Business rule copies date with one day less

Posted on by Microsoft Employee

Hello,


I created a business rule that copies a date from another field. However, when copying, it copies with one day less.

Please, can you help me?

66434.1.PNG

5408258.2.PNG

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Business rule copies date with one day less

    There must be a bug with the business rule engine.

    Notice in the tooltip that one time says 00:00:00 GMT and the other says 21:00:00 GMT.  That explains why it's the wrong date, it's subtracting 3 hours.

    If the business rule is buggy, and the real-time workflow won't work for your use case, then you may need to resort to writing your own custom javascript to execute on change of the source field.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Business rule copies date with one day less

    In Workflow assynchronous the copy was correct.

    In Workflow real-time too. 

    More one print of Business Rule:

    8737.7.png

    My intention was to facilitate typing so Workfow is not interesting as it only displays after saving the record.

    Thank you!

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Business rule copies date with one day less

    Your settings all look correct, so this is a difficult problem.

    As a test, can you try building a real-time workflow that can be executed on-demand and have it copy the date from the one field to the other field on Save of the record?

    I am thinking maybe something is not working in the business rule that may work correctly with a workflow.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Business rule copies date with one day less

    Hello,

    I'm use the native fields:

    2337.3.PNG

    5808.5.PNG

    My Local Time:

    8623.6.PNG

    My complete Bussiness Rule:

    2337.3.PNG

    Thank's a lot!

    Bianca

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Business rule copies date with one day less

    If you are not using the time part of the date and interested only on the date . i suggest you change the Behaviour of both fields to : "Date Only".

    This way the The concept of a time zone isn’t applicable  .

    check this link : technet.microsoft.com/.../dn946904.aspx

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Business rule copies date with one day less

    Could it be converting incorrectly from UTC to local time?  I'm not sure how you could fix that, but it could be the issue.

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans