Roll-up Summary And Formula Field In Salesforce

Formula Field

Hey guys, Hope you are enjoying this series. I have one request to you, please comment your feedback/queries below. So, we can improve it more. We are here to discuss about Roll-up Summary and Formula Field. Both are very useful features of Salesforce and we are using these features in almost every project. So, you can get an idea of how important it is for you. Let’s go to understand both.

First, we are discussing about Formula Fields. We create formula field in same way Setup>>Object Manager>>Field & Relationship>>New as we create a custom field in Salesforce. Just we need to choose formula in options.
Put the name of formula field and select the return type of formula.

Basically, It is used to perform the arithmetic calculation. Suppose you are working on some school project and you have a requirement to calculate the percentage of the student. So, you have two fields first field for Obtained marks and second for Total marks. Now, you will create a new formula field Percentage( % ) and put the percentage formula in this field. You can see the formula and place where you will write the formula below.

Now, when you create the record of any student and fill both fields. Formula field automatically calculates the percentage and show in Percentage( % ) field.

In advance formula, Salesforce provides some standard formula & operators which you can use for making your formula. You can create a conditional basis formula using their formulas and many more things.

So, Congratulation you have learned how to create formula field. Now we are discussing about Roll-up Summary.

Roll-up Summary

Roll-up summary work with Master-Detail Relationship. If you have any doubt about Master-Detail Relationship, please go through our previous article Object Relationship in Salesforce. So, we create roll-up summary field same any custom fields Setup>>Object Manager>>Field & Relationship>>New and choose the option.

But always remember this option only available on the parent object. The object must be a parent of any object like the account is the parent of Opportunity. So, we will see the example on account object.
When you fill the name of the field and click the next page will appear on your screen which is showing in below image.

Here, You need to choose a child object on which you want to perform the options.

Roll-up Summary provides four option:-
COUNT :- For count the child object record.

SUM :- For the addition of field value of all records.

MIN :- For calculate the min value.

MAX :- For calculate the max value.

Note :- Except count, For other options you need to select a particular field where the operation will apply. And you can create maximum 25 roll-up summary field on per object.

One more thing which is very interesting, you can set the criteria. So, now result will come from those record which comes under the criteria.

Hope, you enjoy the article. So, please click on like button. And comment us if you have any query and suggestion for same. So, we can improve accordingly.

Did you enjoy this article?
Signup today and receive free updates straight in your inbox.
I agree to have my personal information transfered to MailChimp ( more information )
50% LikesVS
50% Dislikes