function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mohit Kumawat 20Mohit Kumawat 20 

formula field vs roll up summary

When to use formula field and when to use roll up summary for accessing values from other salesforce objects? Or performing some operations on related objects.
Shubham NandwanaShubham Nandwana
Hi Mohit,
1. Roll up summary fields-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 detailed record. These detail records must be directly related to the master through a master-detail relationship.
    4 types of roll-up summary fields are there  Count, Sum, Min, Max.
Check  https://trailhead.salesforce.com/en/modules/point_click_business_logic/units/roll_up_summary_fields for more understanding.

2. Formula fields: Your users need to access and understand this data at-a-glance without doing a bunch of calculations in their heads. Enter formula fields, the powerful tool that gives you control of how your data is displayed. Formula editor is very easy to use and provides lots of different functions for a different calculation.
Check https://trailhead.salesforce.com/en/modules/point_click_business_logic/units/formula_fields for understanding and using formula editor.

Hope it helps.

Shubham Nandwana.
AppPerfect Corp.
salesforce@appperfect.com
408-252-4100
http://www.appperfect.com/services/salesforce/
Salesforce Development & Operations Experts
 
Asitha_RajuAsitha_Raju
Hi,
A Rollup Summary field is used to calculate the sum of a fields in the child object record. Master-Detail relationship is compulsory to use the rollup summary. A rollup summary field is always created on Master record.
The Roll up Summary field is basically of 4 types:
  • Count
  • Sum
  • Min
  • Max
Formula Field is a read only field whose value is evaluated from the formula defined by us. We can define formula field on both standard as well as custom objects. Any change in expression or formula will automatically update the value of formula field. It is used for calculations within certain object. And it is child to Parent .

While your 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.
Hope this helps you!

 
Daipayan Mandal 12Daipayan Mandal 12
Roll-up summary and Formula field difference
  1. The roll-up summary field performs operations like count, sum, max and min on the set of child records and returns a value. However, the formula field is used to perform arithmetical logical operations in a single record associated with it. It cannot perform the operation as rollup summary do.
  2. Formula field can be used in any type of relationship but rollup summary requires master-detail relationship only.
  3. Formula field and roll-up summary both are read-only fields but roll-up summary stores data in the object and formula field don't store data in the object it’s a runtime operation whenever we call record from the database the formula field always evaluate the related data in the associated field in runtime and return a value.