Roll up Summary fields in Salesforce

To study the Roll up Summary field of salesforce, lets take example from our previous tutorial series

Note : Roll up summary field can only be defined on the master object.

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. These detail records must be directly related to the master through a master-detail relationship.

refer this page, to study more about the roll up fields.

The Roll up Summary field is basically of 4 types:

  1. Count
  2. Sum
  3. Min
  4. Max

As, per our previous sessions on salesforce, lets create roll up field on object Course because this is the Master object.

I want to calculate total income from a course:

Go to App Setup | Create | Objects and click on New field and Select Roll up summary field.

In Step 2, enter the field name and help text etc.

For step 3, you will see below screen,

Salesforce Rollup Summary field
Salesforce Rollup Summary field

In above image, at 1 we have to select the child object, at 2 we have to select the field on which it should calculate.

In our case, Fees paid field is of Formula type which works on currency.

And in section 3 you ca specify weather this roll up summary field include all record or any specific record which comes under the criteria you specified.

So, after creation of Roll up field on Master object final look is shown below:

Salesforce Final look on Roll up summary field
Salesforce Final look on Roll up summary field

Posted

in

by

Tags:


Related Posts

Comments

16 responses to “Roll up Summary fields in Salesforce”

  1. Rhonda Avatar
    Rhonda

    How can I create a roll up field within leads to count the number of activities?

  2. ravinder Avatar

    can we create roll-up summary on formula field

    1. Jitendra Zaa Avatar

      Yeah,
      We can create Rollup summary for Formula field if the type of formula field is number.

      Regards,
      Jitendra Zaa

  3. Krishna Avatar
    Krishna

    hi Jitendra Zaa
    I hava a custom object like students on which field is gender [picklist(male,female)]
    when i created new record Mr/Miss is added to the name.
    when i update the record Mr Mr/Miss Miss is adding to the name by using TRIGGERS in salesforce.
    my requirement is when i create/update the record only Mr/Miss wil be add to the name.
    How can i achieve this one by using Triggers.
    please write the code.

    1. JitendraZaa Avatar
      JitendraZaa

      Hi Krishna,
      Please explain ur problem in detail, I cannot write the complete code for you but can give direction.

      1. Krishna Avatar
        Krishna

        HI Jithendra,

        The scenario is that when i gave Male it is adding Mr. before the name.

        My requirement is when I change the gender(picklist) from male to female, the Mr has to change as Miss.

        How to get the changes by using the triggers?.

  4. krishna Avatar
    krishna

    Hi Jitendra,
    How two accounts are creating while lead conversion?

  5. Satya Vanga Avatar
    Satya Vanga

    Hi can any send salesforce resume for 2years exp, (nvsn39@gmail.com), thak you

  6. […] Do not miss to go through a similar blog from Jitendra Zaa […]

  7. John Guillermo DC Avatar
    John Guillermo DC

    HI Jitu,

    Helpful helpful. I’ve always get back to your site whenever I needed help. 🙂

  8. Viayanand Avatar
    Viayanand

    Thank You Jitendra

  9. Madhu Avatar
    Madhu

    Is it Possible yo Create Conditional Rollup

  10. Asma Avatar
    Asma

    Can we hide roll up summary fields?

  11. Babar Nasim Avatar
    Babar Nasim

    Hi Jitendra,

    Can you help in the answer of following question? When salesforce calculate the value of Rollup summary field?
    1) When the child records updated?
    2) Daily?

    And does it calculate the value of only one parent (where the child record of that parent updated) or calculate the value of all parents?

    Thanks,

    1. Jitendra Avatar

      Whenever child gets updated causing rollup recalculation, it will update parent.

      1. Ashish Avatar
        Ashish

        What about existing records in production? Will the roll up summary calculate the count itself automatically on all parent records? Or do i need to update all childs once to have the numbers calculated on parent

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Jitendra Zaa

Subscribe now to keep reading and get access to the full archive.

Continue Reading