In Dynamics CRM, roll-up field has always been one of the important components required within the system. Roll-up fields, for example, are needed when you want to sum up all of the Actual Revenue from the Opportunities within the same Account, or when you want to roll up a specific field from a child record to the parent.
Microsoft has provided the roll-up field functionality in the latest release of CRM (CRM 2015). You can now use this new feature to create roll-up fields within CRM instead of having plugin to do the job. However, there are some limitations within this new feature that may not fit what you are looking for:
• Workflows cannot be triggered by roll-up fields update
• The roll-up system job is only triggered periodically instead of real-time
• Cannot roll-up using another roll-up field
So is there any other way to create roll-up fields without a development team, but still want to be able to overcome the limitations above? The answer is YES! You can actually implement the same functionality without spending time on coding using Workflows!
First you need to identify all of the scenarios, i.e. record is created, updated, and deleted. Then determine how the roll-up value should change.
In order to implement this, you will need to create 2 workflows:
1. Create a real-time workflow on the child entity
a. Set the trigger to “Record is created” and “After – Record fields change” (select the field that will be used to roll-up to the parent record)
b. Add a “Update record” step that will update the parent record
i. On the roll-up field of the parent record, select “Increment By”, then choose the field from the child record
2. Create another real-time workflow on the child entity
a. Set the trigger to “Record is deleted” and “Before – Record fields change” (select the field that will be used to roll-up to the parent record)
b. Add a “Update record step that will update the parent record
i. On the roll-up field of the parent record, select “Decrement By”, then choose the field from the child record
The logic behind these two workflows
1.On create of the child record, it adds the value to the parent record (first workflow)
2. On update of the child record, it first decrements the roll-up field by the original value from the child record (second workflow), and then increment the roll-up field by the updated value (first workflow)
3. On delete of the child record, it decrements the roll-up field by the deleted value (second workflow)
Using these two workflows, you can now overcome all of the limitations from the CRM 2015 Out-of-the-box roll-up field feature and at the same time avoid custom coding.
The roll-up fields in summary allow you to manage the total number of contacts, revenue, leads, contacts and multiple records in one place in Microsoft CRM Dynamics! Things don’t get much easier!
To find out more contact us at 416-410-8444 and let Atum help you!