Dynamics Tip: Using business rules to sum up more than two fields

By | October 19, 2017

When defining a formula in the business rules editor, we can only use two entity fields:


So, what are we supposed to do when we have, for example, four fields to sum up (other than creating a calculated field or adding a javascript/workflow/plugin)?


Turns out, we can simply add multiple actions to the business rule so that every action will add one additional value to the sum field(and the first action will copy value from the first value field):


We also have to remember to add all those value fields to the condition just to make sure the business rule kicks in on all field changes:


And, once we have that, here is the end result:


It works.. Although, I guess it may still be easier to use javascript for thisSmile

3 thoughts on “Dynamics Tip: Using business rules to sum up more than two fields

  1. Abhinav Sobti

    Tried the above workaround, but I got an error saying “You can’t create this rule because it contains a cyclical reference. Fix the rule and try again.”

    1. Deepak Mehta

      Change the scope to forms and then it works. If the scope is entity then it throws an error.

      1. Thomas

        How come this works?
        Do you have any papers/articles explaining this?


Leave a Reply

Your email address will not be published. Required fields are marked *