Today we would be discussing drawbacks in addition to advantages of using Rollup and Calculated fields which were in place from CRM 2015.
It is really good to know these when using these fields for your implementation, else later you might face serious problems caused by increased implementation costs.
So here we go,
Calculated Fields
Pros
- Ability to populate a field with simple calculations based on other values and conditions on the form in a real time manner. This alleviates the need for JavaScript in fairly straight forward scenarios such as adding days or months to a date, or adding or subtracting fields on the same entity.
Cons
- Missing the kind of complexity you get from Excel formulas
- Example: There is no “MAX” function that you can use with dates to get the max of more than one datetime field.
- Updates to these fields won’t trigger workflow updates
- Fields are only available for retrieve in plugins and are not available as part of create or update plugins
- Fields are virtual and not stored at the database level
- Many times they are un-sortable in views unless you use all simple field types in your calculation
- Not available offline with the Outlook Client
- You cannot mix and/or statements. Can only use all OR’s or all AND’s
Rollup Fields
Pros
- Allows aggregation of data from related child entities up to a parent entity. This allows for some aggregation scenarios that might have previously required the use of custom code in workflow, plugin, or complex JavaScript to be done much more easily.
- Counts, Max, Min, and Sum
- Stored in the database as an actual field
- You can trigger this via the API in code manually and as an administrator you can postpone rollup calculations from settings.
Cons
- Not real time
- Currently the default is every 12 hours by default.
- Not good for on-demand reporting needs
- Rollup re-calculations will not trigger a modify call at the platform level and there is no other good plugin hook to use besides registering a plugin on the related child entities that are part of the recalculation.
Let us wait if Microsoft brings some changes to avoid these limitations..
Cheers,
PMDY