CRM 2016: Business Rule - Set to change a field when a date has passed - Works but not automatically RRS feed

  • Question

  • I have a Business Rule setup to change a field "Status Reason" to "Expired" when the "Sub End Date" has passed.

    The Rule works but not like i need it to.  I would like the update to happen automatically.
    From my screen shots below you will see...

    The View shows the "Status Reason" as "Active" and the Sub End Date 3/14/2017 which has passed (so this status reason should be show "Expired")

    When you open up the record you see the "Status Reason" field shows "Expired", I have to save the record in order for this to be set and for the View to show "expired".

    I need field updated to "Expired" and the View to show "Expired", automatically.
    I have created New data after the business rule was created to test this and still does not happen automatically...  So what Am I Missing? Is there some job that needs to be created that would make this happen daily?

    Scope:  Entity

    Wednesday, March 15, 2017 2:22 PM

All replies

  • Hi Robin,

    There is a property called Scope on the top right corner of the business rule. Set it to "Entity". In this case, we do not need to open the Dynamics CRM form for the business rule to fire. Business rule will fire even if the business rule condition is met by doing an SDK operation via plugin or workflow.


    Sachith Chandrasiri

    Wednesday, March 15, 2017 10:18 PM
  • That's what I have.  Scope is set to Entity.

    Again I have a record that had a 3/15/17 End date and when I just looked at the Subscription View I see the Status Reason still shows "Active" not "Expired" (opening the record the status reason will show "expired")

    Thursday, March 16, 2017 1:28 PM
  • Hi Robin,

    How are you comparing the sub end date with "Today"? Is "Today" another field you created?? If so how do you populate that field?

    Business Rules does not have a way to compare a date field with current date and time.

    Sachith Chandrasiri

    Friday, March 17, 2017 2:55 AM
  • Sachith,

    I appreciate you taking the time to respond to my posts, I need lots of help since i'm new to this.  So all the answer you can provide are greatly appreciated.

    I created a field called "Today" Date/Time Calculated action of "Now()"  so that's where the "today" is coming from within my Condition.

    If I can't do this in the rule, how else could I get this to happen?   I need field "status reason" to change to "expired" when the sub end date has passed and it would need to happen automatically.

    Friday, March 17, 2017 1:27 PM
  • I don't think you can accomplish what you want to do with a Business Rule.  Business Rules are like little snippets of JavaScript code that only execute when you update the record manually.

    You might want to consider making a background workflow process that will 'wait' the 'sub end date' and if it passes, then change the status of the record then.  You'll want to do another condition check to ensure it hasn't already been Expired.

    Good Luck!

    Friday, March 17, 2017 7:38 PM
  • What you are trying to achieve is not possible with business rule, either choose a recursive workflow or a daily job to achieve this.

    Ramanathan Rajendran MCTS - Dynamics CRM

    Sunday, March 19, 2017 6:32 AM
  • This is where my NON-Experience in this stuff comes into play.  I have no idea of what your saying to do.  Could you provide a short step by step on what/where I would need to do this in?  If you could I would appreciate it, but right now i'm just stuck, I have no idea to get this to work without manually opening up a record and then saving it. 

    Friday, March 31, 2017 5:41 PM
  • No problem, we've all been there. :)

    The first step you already have setup to calculate/set the 'sub end date', so I won't explain that part.

    Next, you will create a workflow process. Navigate to Settings, Process and click new to create one.  This post explains all the workflow options.


    Then take a look at this blog post to see how to set a process timeout:


    The second option for 'Process Timeout' is what you want to look at.  In your example, you would have the workflow timeout on the 'Sub End date' that the record already has.

    • Proposed as answer by Katina Hester Thursday, April 6, 2017 2:44 PM
    Friday, March 31, 2017 5:50 PM
  • For creating recursive workflow:


    For creating a custom workflow activity which can be used in a workflow:


    For daily jobs,

    1. You can develop a c# console app/service and schedule it in windows local server or azure server.
    2. You can develop an SSIS package and schedule it.

    Ramanathan Rajendran MCTS - Dynamics CRM https://exptechsolutions.blogspot.com/ www.linkedin.com/in/ramanathan-rajendran

    Sunday, April 9, 2017 5:06 PM