Synopsis
At the last Wellington Dynamics User Group (WDUG) I ran, I was asked by one of the regular attendees “H” whether rollup fields are also calculated on disabled records. So I thought I would give it a try.
Introduction
In my last session at the WDUG, I covered “What is new in CRM 2015”. The session was tailored for Power Users, and people interested in configuration and customisation.
As we all know, rollup fields have been introduced in CRM 2015 and rank as one of the highest new features on my list.
“H”, one of the regular attendees at WDUG, asked me during my presentation whether the rollup fields are also calculated on disabled records. This got me a bit baffled, so I decided to try it.
There are two parts to the question actually.
- If the related records are disabled, are they still included in the aggregation?
- If the main record is disabled, will the field still be calculated on it?
Preparation
To test the scenario I created 2 accounts with 2 opportunities each. I populated some random values in the estimated revenue fields.
I disabled one of the accounts (but not its opportunities). I also disabled one of the opportunities related to the active account by setting it to closed as lost.
I then created a new Rollup currency field on the account record called “Total Amount” that would calculate the SUM from all the opportunities’ estimated revenue.
Once the field was created and published, I had to force the appropriate system job to trigger (it is usually scheduled to trigger 12h after the field’s creation). The system job was called “Mass calculate the account.new_totalamount rollup field”.
Impatiently I waited for the results.
Results
Both active and inactive records got their total amount calculated. The calculations included both active and inactive related records.
Interesting results that of course have an explanation.
Explaining the results
1- “Will the rollup field include the values from the related disabled records?”
Of course it will. Disabled records are like any other record, except they have a state of disabled. If we want to exclude them, we can explicitly specify the exclusion in the rollup field related entity’s filters.
2- “Will the disabled main records also be updated”
Yes they will. Even though disabled records are not editable using the UI, they can still be updated in the background by CRM.
I guess it makes sense to get the disabled records updated to preserve the system’s integrity.
Conclusion
Answering the question “Are rollup fields calculated on disabled records?” The answer is YES.
If users want to exclude the related records the field aggregates from, they can simply set a filter in the rollup field configuration.
Thank you “H” for asking the question 🙂
H
Thanks Rami, sorry just seen all your very good work…
sumedha
Thank you H for asking and Thank you Rami for doing the R&D for all of us 🙂
You just saved my day.