Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Auto job to update status

Posted on by 90

We have an entity called Agreements which has a status and an expiration date.  I want to create a method of automatically (no trigger) checking the expiration date on every agreement record and if the date is equal to today's date, set the status to "Expired".  I would prefer not to have a job running in the background 24x7; maybe a scheduled job to run at midnight nightly.

What is the best method of accomplishing this?  Thanks!

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Auto job to update status

    Hi,

    If your CRM is hosted on cloud then go with option suggested by Leah.

    If your CRM is hosted on onpremise then Console Application is best option to achieve your requirement. And Schedule your Console app using Tasks scheduler on your server.

    Please mark my answer verified if i were helpful

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Auto job to update status

    Hi DawnK,

    Scheduled flow ca help you achieve it easily, A scheduled flow specifying when the date/time the flow will run and the frequency of the scheduled flow (once, daily, weekly and monthly) and provide additional filter conditions for the records.

    Here is the screenshot of the flow:

    pastedimage1601014297856v1.png

    Here are details steps about the flow.

    1.Go Power Automate(https://us.flow.microsoft.com/en-us/ ) to create a Scheduled flow.

    pastedimage1601014313210v2.pngpastedimage1601014319638v3.png

    2.Add ‘List Records ’ action.

    pastedimage1601014332623v4.png

    3.Add ‘compose’ action.

    pastedimage1601015160598v1.png

    4.Add ‘condition’ action:

    pastedimage1601014950997v1.png

    5.Add ‘update records’ action:

    pastedimage1601014399800v7.png

    6.Save and test the flow.

    pastedimage1601014493235v8.png

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

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

Product updates

Dynamics 365 release plans