- Rollup fields can be performed between two entities. A rollup field contains an aggregate value computed over the records related to a specified record, such as open opportunities of an account. Also, you’ll be able to aggregate data from the activities directly related to a record, such as emails and appointments, and activities indirectly related to a record via the Activity Party entity.
- Aggregate data by using the following functions: SUM, COUNT, MIN, MAX and AVG.
- We can create Rollup Fields by creating “Field Editor”
- To open field “Field Editor” To open the Field Editor, go to Settings > Customizations > Customize the System > Components > Entities. Select the entity you want and choose Fields. Choose New.
· In the Source entity section, you specify the entity for which the rollup field is defined and whether or not you aggregate over a hierarchy.
· In the Related entity section, you specify the entity over which you aggregate. This section is optional when you choose to rollup over the hierarchy on the source entity.
· You can choose available Aggregate functions, such as SUM, COUNT, MIN, MAX or AVG.
For Example:-
If we want to calculate account related contacts - Annual Income then the 1-n relationship must be available between account and contact.
Finally the sum of all account related contact annual income will be store in the source Entity (account)
Field i.e. Annual Income as shown below
Example 2:-
In this example, count the total number of emails sent to an account, where the account is listed on the email’s “To Recipient” line. This is done by specifying the Participation Type in FILTERS for the Activity Party entity in the rollup field definition. If you don’t use filtering, then all available participation types for an activity are used in the calculation.
Rollup Fields are not updated in real time
- When you create a new Rollup Field, a new mass calculation job will be created for the field. This will be scheduled 12 hours into the future. The reason for such precaution is that the very first calculation job will have to populate each and every record that exists for that entity, which could be up into the millions, depending on what type of data you manage in your CRM.
- Initial rollup and the recurring rollup requests are handled by different system jobs in the CRM platform. Initial rollup request is initiated after 12 hours of creation of roll up field where as the recurring rollup requests are initiated after every hour.
- Rollup Field implementation architecture is that these calculation jobs are only applied to records that were created, updated or deleted after the last job finished.
- Thus Rollup Fields may not show a current values in the UI for quite some time.
- Force the recalculation of the Rollup Field value.
- As an end user, over the rollup field and click the “recycle” icon to force the recalculation of the Rollup Field value. As shown below
- By clicking on it the result will be populated automatically.
Limitation for the Roll-up Fields:-
· You can define a maximum of 100 rollup fields for the organization and up to 10 rollup fields per entity.
· A workflow can’t be triggered by the rollup field updates.
· A workflow wait condition cannot use a rollup field.
· A rollup over the rollup field is not supported.
· A rollup can't reference a calculated field that uses another calculated field, even if all the fields of the other calculated field are on the current entity.
· The rollup can only apply filters to the source entity or related entities, simple fields or non-complex calculated fields.
· A rollup can be done only over related entities with the 1: N relationship. A rollup can’t be done over the N: N relationships.
· A rollup can’t be done over the 1: N relationship for the Activity entity or the Activity Party entity.
· The business rules, workflows or calculated fields always use the last calculated value of the rollup field.
· By click the “recycle” icon to force the recalculation of the Rollup Field value changes but the Plugin can’t be triggered by the rollup field updates.