web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Auto Update Field Status when date is reached

(0) ShareShare
ReportReport
Posted on by 37

I have a module that collects Drivers Licenses expiration dates, I need a status field to update to "inactive" when the drivers license expiration date field is exceeded. I.e. if license expired yesterday and flow ran today it would see the date in the past and update the status field to inactive.

I also need a business process to do the opposite when a DL expiration date is updated to change the status back to Active.

I have tried to figure out using power automate and the classic d365 process flows (I am using Dynamics 365 CRM).

No luck..

I have the same question (0)
  • Suggested answer
    Manoj Mane Profile Picture
    1,020 on at
    RE: Auto Update Field Status when date is reached

    Hi,

    You need to write the advance formula in the if condition in the Flow.

    You can compare the date field with the help of below formula in Flow:-

    For example:-

    formatDateTime(items('Apply_to_each')?['Drivers_Licenses'],'yyyy-MM-dd')
    
    is equal to
    
    utcNow('yyyy-MM-dd')



    pastedimage1641542535716v1.png


    If the condition gets satisfied then inactivate the Record.



    =======================================================

    For the 2nd requirement you need to write the another flow:- 

    How you are going to update the DL field once you marked the record as inactive as on Inactive record in Dynamics it is a read only record.

    If you have some process already built in then you can follow the below approach:- 

    When DL date is updated check the DL date  is future date and mark the status field to activate.

    Thanks,
    Manoj.

    Please mark this as VERIFIED if it helps.

  • Verified answer
    Bipin D365 Profile Picture
    28,983 Moderator on at
    RE: Auto Update Field Status when date is reached

    Hello,

    First requirement can easily be achieved using Power automate. Open advanced find and add filters as shown below -

    CR47.PNG

    Click Download fetch xml and open xml on notepad. You will need this in Power uatomate List rows.

    Now Create schedule Power automate to run your flow everyday as shown below -

    CR48.PNG

    Now Add List rows Action from Dataverse, select your entity and paste fetch xml

    CR49.PNG

    Now add Apply to each and Update a row to deactivate your record as shown below - 

    CR50.PNG

    You are done and now you can validate your flow.

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at
    RE: Auto Update Field Status when date is reached

    Hi,

    If you are not familiar with Fetch xml then use below syntax in Filter Rows property of List Rows Action -

    (Microsoft.Dynamics.CRM.Today(PropertyName='new_licenseexpirationdate') and statecode eq 0)

    CR51.PNG

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 247

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 166 Super User 2025 Season 2

#3
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 164

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans