5

I have a confusion on whether to go for formula fields or roll up summary fields in some scenarios. As we can calculate the aggregate values in formula fields also, then why/when should we go for Roll up summary. What are the differences between them.

1
  • "As we can calculate the aggregate values in formula fields also" - how would you do that in a formula field on multiple related records? I didn't think this was possible except through rollup fields via Master-detail relationships... – Brian Miller Aug 6 '19 at 12:21
7

A Rollup Summary field is used to calculate the sum of a fields in the child object record. It is compulsory to be in a Master-Detail relationship to use the rollup summary. A rollup summary field is always created on Master record.(Parent to Child).

Example. You have an Account and multiple Contacts under that Account. Each of the Contact have a number field on it say Contacted People. Now on the Account you can create a Rollup summary to check the Number of Contacted People via all your contacts.

Where else a formula field is mostly used for calculations with in a certain object. And it is child to Parent .

1
  • Thanks for the detailed explanation... This is exactly what i want. – Radhakrishna Mar 2 '15 at 8:49
0

While formula fields calculate values using fields within a single record, roll-up summary fields calculate values from a set of related records, such as those in a related list. You can create roll-up summary fields that automatically display a value on a master record based on the values of records in a detail record. These detail records must be directly related to the master through a master-detail relationship.

For example, you might want:

  • A custom field(rollup summary field) in Account obj that calculates the total of all related
    pending opportunities.

Account and Opportunity are in master detail relationship.

Rollup summary field is read-only field that displays the sum, minimum, or maximum value of a field in a related list or the record count of all records listed in a related list

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.