Rollup fields are a field type in Dynamics 365 that allow for data to be saved in the database through a rollup calculation. We will go through an example of creating a rollup field.
Let’s say we want to add a new rollup field to the account entity. Go to the entity and select New Field. Select the data type and then select the Field Type as Rollup:
The calculation window is open. Note the message at the bottom of the window.
The mass calculation job will automatically be scheduled to run approximately 12 hours from the time that the rollup field is saved.
Note we can add a related entity. We will choose Orders, and our field will roll up the count of the orders for this customer.
Note the options available:
Save the field, and add the field to the Accounts form. Note we can see there are 3 fields actually created:
- New Rollup Field
- New Rollup Field (Last Updated On)
- New Rollup Field (State)
We will add all of these to our form.
Save and Publish.
If you go to the Accounts form now, you will see the fields showing blank.
Hovering over the field, you will see a Refresh icon. Click it, and the field will calculate:
Now let’s go to the Recurring System Jobs view. Go to Settings->System Jobs:
You will see several SYSTEM rollup fields. Change the view below and find the new job created:
Now, if we select the Calculated Rollup Field record, open it, and select Actions, we see a Modify Recurrence:
Here you can set the recurrence to hourly and daily and the start time: