Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Answered

Business Rule not applying on date field check against now

Posted on by 15
Hi,
I'm having issues with a business rule not running, and hoping someone may be able to shed some light on the issue.

We have a table called Licences, which holds licence details and the expiration of the licence.
In this table, we have three relevant columns:
  • Expiration Date (the manually entered date of expiration of the licence)
  • Date check - now (a calculated date field with the formula: AddDays(( - 1), Now()))
  • Date check - 30 days (a calculated date field to identify the date 30 days in the future: AddDays(30, Now()))
The two date check fields are auto-calculating and working.
I'm now trying to use them in a business rule to change the status reason field to 

IF
Document expiration less than Date check - current and Status is Active
THEN
Set Document Status to /🔴 Expired/
ELSE IF
Document expiration less than or equal Date check - 30 days and Status is Active
THEN
Set Document Status to /🟡 Expiring Soon/
ELSE IF
Status is Active
THEN
Set Document Status to /🟢 Current/
ELSE

If I update a record, it updates the status fine, but as dates change through natural passing of time, the status doesn't change (even though the date check fields do).

Can someone please assist in identifying what I'm doing wrong?

Thanks 
Luke
 
  • Dynamic Luke Profile Picture
    Dynamic Luke 15 on at
    Business Rule not applying on date field check against now
    Thanks Leah,
    Yes, that has worked.  Didn't even think of that to be honest.
     
    Cheers
    Luke
  • Verified answer
    Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    Business Rule not applying on date field check against now
    Hi Partner,
    Maybe you can create one flow to replace the business rule.
    --Creating one scheduled flow
    Run the flow each day:

    I hope you can verify my answer if it helps you! If you have any questions, please feel free to contact me.
    Regards,
    Leah

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,524 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans