[SalesForce] the diffrence between formula field and Rollup summary in Salesforce

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.

Best Answer

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 .

Related Topic