Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Business Rules on Custom Entities?

  • 1.  Business Rules on Custom Entities?

    Posted Mar 01, 2019 10:44 AM
    Edited by Tamara Sayer Mar 01, 2019 10:45 AM


    Our org is set up with Dynamics 2016 on-prem. We have a custom entity set up with business rules based on certain fields changing, and workflows built around dates and those fields changing.

    Ex Business Rule: If A field = No, and B field = No, change status to Executed.

    There are 5 of these rules in total.

    Ex Workflow: If status = Executed and Maturity Date = X, timeout after 45 Days and change custom entity status to Completed. Send task to team.

    There are 9 of these workflows in total.

    As of the last few weeks, we are noticing that those records with status of Completed are reverting back to the previous status. We feel the root of the problem is in the business rules; when we open that entity, we notice the status reason initially shows the correct status but then the page loads and it reverts to the incorrect status.

    Has anyone encountered this before?

    Tamara Sayer
    Implementation & Adoption Analyst
    Synergy Credit Union
    Lloydminster SK

  • 2.  RE: Business Rules on Custom Entities?

    Posted Mar 01, 2019 10:50 AM
    Yup, this is pretty common when adding these kinds of rules.

    Two suggestions:
    1. (I don't remember if you need to upgrade to D365 for this, but that is a free upgrade)  Make sure all business rules that affect one field are merged into one business rule and use a set of if-then statements to make sure the correct status is presented at any give time.  This also gives you a single rule to troubleshoot if you see the wrong value.
    2. Turn off business rules one-by-one until you see the behavior you expect.  Add a condition to that rule of "if Status does not equal Completed" to make sure it doesn't improperly trigger anymore.

    Wayne Walton
    CRM Practice Lead
    eBECS Limited
    Atlanta GA

  • 3.  RE: Business Rules on Custom Entities?

    Posted Mar 01, 2019 10:56 AM
    Much appreciated, Wayne!

    Tamara Sayer
    Implementation & Adoption Analyst
    Synergy Credit Union
    Lloydminster SK

  • 4.  RE: Business Rules on Custom Entities?

    Posted Mar 06, 2019 07:13 AM
    ​I agree with Wayne's response and will also add that you should confirm there is no JavaScript running on the form load (since you mentioned the status changing when you opened the record). JavaScript will run when the form loads and can overwrite any business rules in place.

    Meghan Deaver
    Surgent Professional Education
    Devon PA

  • 5.  RE: Business Rules on Custom Entities?

    Posted Mar 07, 2019 02:10 AM
    Hi Tamara
    It looks like your business rule and workflow have different conditions to update the same field. I would recommend adding the maturity date condition to your business rule and you should be fine.
    Whats happening is after the workflow has updated to completed, the next time the form is opened the business rule is checking your field A and B and setting it back to executed. If it also checks the maturity date, it should not do this after the workflow is complete.


    James Abraham
    Practice Lead, Dynamics

If you've found this thread useful, dive deeper into User Group community content by role