Welcome to our two-part blog series on Field Types. In today’s entry, we’ll discuss Rollup Fields, including when and why to use them and how to add them. If the concept of a rollup field is completely unfamiliar, you can get a crash course here. If you’ve got even a basic understanding, you’re good to go. Let’s get started… Rollup fields allow for aggregation of data from multiple child records to a single parent record. They are a great tool when you have a parent opportunity to which you want to associate many potential child opportunities – everything is in one field! But there are plenty of other uses for a rollup field. For example, let’s say you want to track as tasks every piece of effort against an opportunity. Is all the effort the same? Of course not. Do some opportunities require 15 pieces of effort (tasks) while others need just one? Yep. Are there trends and correlations between number of tasks and the eventual outcome (win or lose)? Almost always! Well, rollup fields can help with all of this. So, let’s assume we want to easily see the number of tasks against each opportunity, as well as how many of those tasks have been completed at any given time. To accomplish this, we will first create two new rollup fields – one for associated tasks and the other for completed tasks. Note that to perform the tasks described, your security role must allow you to customize entities.
1.)Begin by creating the first of two new Fields – in our example below, we’ve named it Tasks. Set “Data Type” to Whole Number; set “Field Type” to Rollup.
2.)Click Edit to modify the properties of the Rollup field. Set “RELATED ENTITY” to Tasks and “AGGREGATION” to COUNT of Task, as shown:
3.)Next, create another new Field – in our example below, we’ve named it Tasks Completed. Once again, set “Data Type” to Whole Number; set “Field Type” to Rollup.
- Note that including the word “Task” in both field names will make it easier to reference in other calculated fields. For example, in Part Two of our four-part series on calculated fields, we’ll discuss Percentage Fields.
4.)Click Edit to modify the properties of the Rollup field. Set “RELATED ENTITY” to Tasks, “FILTER” to If Activity Status equals ‘Completed,’ and “AGGREGATION” to COUNT of Task, as shown:
5.)Next, we need add our two newly-created fields to our Form and View. Before adding the new fields to the Form, however, we must first decide how we want them to appear: in an existing Section or in a newly-created dedicated Section. In our example, we’ve created a new Section, as shown below. (For more information on how to insert a new Section, see Customizing Entities.)
6.)Next, we need to add our new fields to a View, which is as simple as selecting the View and adding the columns. (For detailed information on how to do this, please see Customizing Views.)
7.)Publish all changes. When you first create Rollup fields, it may take up to 24 hours for the calculations to be applied, so don’t be alarmed if all the fields are blank initially, as shown below.
8.)Just keep checking back. Opening a Record and navigating to the Task fields you created will allow you to force a calculation:
Eventually, all your data will be populated, as shown:
And that’s it. We can now see the number of tasks associated with each opportunity, as well as how many of those tasks have been completed. Let the tracking, trending, and correlating begin! Hopefully, you found this helpful. As we said at the beginning, this is the first in a two-part series on Field Types. Stay tuned for more.
In the meantime, make sure to checkout our upcoming webinar, Dynamics 365 for Sales for SMB Enterprise Licenses, on June 7!