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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Need to change a status on a record based on a field's date compared to today

(0) ShareShare
ReportReport
Posted on by

Hi all:

I have a custom entity that has a start date and an end date; the data is static unless the end date is changed (i.e., the customer purchases another subscription period).  My problem is I need to make the record inactive if the end date passes today with no further action.

I am not sure how to do this best:  do I need another field (hidden) with today's date to compare to the end date?  Do I need a workflow to trigger this?

*This post is locked for comments

I have the same question (0)
  • ansrikanth Profile Picture
    3,115 on at

    Hi 

    I dont think it is that easy to get it done with a workflow. I would suggeest to go for a saparate console application which executes every night and will check for all the records that needs update on that day and will close the records using Bulk Request. I think that should be pretty stright forward and effective interms of performance/server utilization etc.

    Thank you

    Regards

    Srikanth

  • Verified answer
    Abed Haniyah Profile Picture
    4,287 on at

    Dear Robert,

    You can do it by using workflow with adding  “wait” step in your workflow.

    Please refer to : gonzaloruizcrm.blogspot.com/.../quite-often-we-have-business-process.html

    blogs.msdn.com/.../part-1-happy-birthday-via-workflow-using-client-side-scripting.aspx

    Regards,

    Abed.

  • rmcanally65 Profile Picture
    on at

    Thanks, Abed...I am testing that right now.

  • ansrikanth Profile Picture
    3,115 on at

    Hi, There could be potential chance of performance hit with recurring workflows if you are expecting "more ??" number of records.  

  • Verified answer
    Community Member Profile Picture
    on at

    The approach described in my reply to this thread is probably the one to go for, adapted for your scenario:

    social.microsoft.com/.../crm-2013-workflow-that-has-to-send-a-notification-after-3-months-from-product-end-date

  • rmcanally65 Profile Picture
    on at

    Thanks, Adam.  I think this will work perfectly.

  • Carol J Kelly Profile Picture
    7 on at

    Srikanth, I need to create this console application to update date every day for a custom entity. I have a calculated Date(Now) field, date only. I added javascript to this when it changes to update a Date simple field that runs a workflow. Problem is the calculated field is changing but not firing the event. Must have to open up all the records which is not an option, there are 1000s of records. This console app needs to grab all active records statecode active(0) and update simple date field field to Now() at midnight. Any code examples would be helpful if you have some... if not no worries.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans