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

You can perform different types of calculations with roll-up summary fields. You can count the number of detail records related to a master record, or calculate the sum, minimum value, or maximum value of a field in the detail records. 

Since roll-up summary fields are based on master-detail relationships, it’s useful to review object relationships before creating a roll-up summary field.

Master-Detail Relationships

Master-detail relationships closely link objects together so that the master record controls specific behaviours of the detail and sub-detail record.

You define a roll-up summary field on the object that is on the master side of a master-detail relationship. For example, you can create a roll-up summary field on the Account object, summarizing related opportunities:

Creating the Summary Field

  1. Click Setup | Customize | Your Object | Fields.
  2. Click New.
  3. Choose the Roll-Up Summary field type, and click Next.
  4. Enter a field label and any other attributes. Click Next.
  5. Select the object on the detail side of a master-detail relationship. This object contains the records you want to summarize.
  6. Select the type of summary:
  7. Enter your filter criteria if you want a selected group of records in your summary calculation. If your organization uses multiple languages, enter filter values in your organization's default language.
  8. Click Next.
  9. Set the field-level security to determine whether the field should be visible for specific profiles, and click Next.
  10. Choose the page layouts that should display the field. The field is added as the last field in the first two-column section on the page layout. For user custom fields, the field is automatically added to the bottom of the user detail page.
  11. Click Save to finish or Save & New to create more custom fields.

Examples of Roll-Up Summary Fields

Here are more examples of detail data rolling-up to master records.

Date Opportunity First Created

A roll-up field was created on the Accounts object. Created Date is summarized on the Opportunities object to find the earliest date an opportunity was created related to an account.

Total Price of All Products Related to An Opportunity

A roll-up field was created on the Opportunities object. Total Price is summarized on the Opportunity Product object to find the grand total of all products related to an opportunity.


Comments

Popular posts from this blog

Types of Record Sharing

Salesforce Admin 201

Account Territories