Rollup fields are a great new feature of CRM 2015, allowing for aggregation of data from many child records to an eventual Parent record, which can be incredibly useful in many business scenarios
In our scenario, our client Joe's CRM Shop would like to see the Actual Revenue of all closed Opportunities this year, for all Child Accounts, of Account ABC Company, displayed on the ABC Company Account record.
Let's get started!
- To create a roll-up field, you must start from a newly created field, choose your "Data Type" (which must match the type of field you'd like to roll-up), and set the "Field Type" to Rollup".
- Then, you must press the "Edit" box that appears next to the "Field Type" field.
Here, you can determine the filters and structure that will be applied to this roll-up field.
- Source – the source entity will default to the entity on which you are creating this field. In our example, we have been defaulted to the Account entity.
- Hierarchy – this is where we specify if we’d like to roll-up the data between a parent/child relationship on the Source In our example, we want to capture Opportunity information for all of ABC Company’s child Account’s, so we must utilize the “Parent Account” relationship between the Child Accounts and ABC Company.
- Related Entity – this is where we specify if we want to get related entity data in our roll-up. In our example, we want to get data from the Opportunity records that are related to the Child Accounts of ABC Company, so we select “Related: Opportunities (Account)”.
- Filters – filters allow for us to put forth criteria for records to meet before they can be pulled into the roll-up. In our example, we only want the aggregation to occur when an Opportunity record has been closed as Won, in the year
- Aggregation – finally, here we have chosen the filed on thee Opportunity record that we want to roll-up, and we’ve chosen to utilize the “SUM” function.
These steps will allow for us to display the Actual Revenue yielded from ABC Company in the year of 2014—taking into consideration all of their child Accounts—on the ABC Company form.
A couple of things to keep in mind when thinking about roll-ups:
- Once a field is created, you cannot change the “Field Type”. This must be set at creation of the field.
- Roll-ups operate on the asynchronous process, and the roll-up is performed every hour. However, you can also trigger them via pressing the “refresh” icon in the actual roll-up field on the form:
- Roll-ups are not available for N:N relationships, they will only work with direct 1:N relationships.
When combined with workflow, portable business logic, and calculated fields, roll-ups have the capacity to absolutely unleash the power of Microsoft Dynamics CRM, with no coding necessary!
We hope you enjoyed our CRM blog! Check out our other Dynamics CRM education materials or sign up for a Dynamics CRM boot-camp to keep your knowledge in check!