Looking for PowerObjects? Don’t worry, you’re in the right place! We’ve been part of HCL for several years, and we’ve now taken the final step in our acquisition journey: moving our website to the HCL domain. Nothing else is changing – we are still fanatically focused on Microsoft Business Applications!

PowerObjects Blog 

for Microsoft Business Applications

|

Roll-Up Fields in Dynamics CRM 2015

Post Author: Joe D365 |

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!

Joe CRM
By Joe D365
Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.

19 comments on “Roll-Up Fields in Dynamics CRM 2015”

  1. I've actually found in my experimenting that refreshing the record does not recalculate the rollup field.

  2. And after more testing it does not recalculate the rollup field after an hour, or even 3 either. I opened the record the field was on, the field still held the old value (despite having added another opportunity related to the account) and it was not until i used the refresh button next to the field that the value in the field recalculated and correctly reflected the newly added opportunity. hopefully this is just a bug in the Vega release otherwise this makes the rollup field no real replacement for a plugin.

  3. How is this impacted by permissions? What if the user does not have permissions to see all the Opportunities on the Child Accounts, do they get a roll-up value that reflects what they have permissions to see or do they see the "true" value?

  4. Love to hear the answer for Dale about how this control is impacted with the user permissions.

  5. I am getting the error "Record currency is required to calculate rollup field of type currency. Provide a currency and try again." Please help me on this..

    1. Hi Ravi - Make sure you add the currency field on the form and also populate it with the correct currency. This shld fix this error.

      1. Joe, what if you created 100,000 records and only added a rollup currency field after the fact. Is there a clever way to add the currency (US Dollar) to all these records?

    2. Don't need the Currency field on the form, but the field need to have value in it

    3. I am also getting the same error if I try to create a roll up field in the custom entity I have created. However, this works fine for me if I create a roll up field in Accounts >> Opportunity default entities. This makes me wonder that there is something extra that needs to be done at form or entity level in case of creating a roll up field in custom entity. Did you manage to get pass the issue?

  6. Hi, Joe

    How would you deal with Rollup fields in data migration. e.g. if I would migrate a large volume of record(500k+), how would I set up the values for Rollup fields.

    1. Hi Travis - The rollup calculations are done via batch. However, if we are importing a ton of data it may be advisable to postpone the rollup calculations then resume as soon as the big import is done. We can control this recurring jobs and Mass Calculate Rollup Fields job.

  7. I'm attempting to create a roll-up field on the account entity that will allow me to compare actual revenue, through this date in the prior year. I have a Date field on the Invoice which is the posted date, + 365. I want to be able to roll-up rev where "Date + 365" is equal to "This Year", but less than "TODAY".

  8. Hi!

    I have a rollup field for YTD in my Product entity which keeps track of sold quantities (based of posted invoices). Just like you show in your text above, I have set the filters to "created on" equals or is greater than "1/1/2016". My goal is however that this will change to 2017 automatically when we reach a new year - does anybody know if this is possible?

  9. So i created a rollup field on the contact entity to show last activity. There is not a manual refresh option like there is on the Account entity...any ideas?

  10. Rollup field types do not look to be available within workflows when those field values change. Running into an issue where I need a WF to fire when a rollup field value changes, but it is not an option. So I set the WF to run when the modified date is updated, but since rollup fields are async they do not trigger the modified date when updated

    Any ideas on how to fire a WF when a rollup fields changes?

PowerObjects Recommends