Roll-Up Summary Fields
A Roll-Up Summary Field is a read-only field on a master (parent) object that calculates values from related detail (child) records. In Salesforce, it is one of the key declarative tools for aggregating child data without code, and it is a frequent topic on the Platform Administrator II exam under Objects and Applications. Key characteristics: 1. Relationship requirement: Roll-Up Summary Fields can only be created on the master side of a Master-Detail relationship. They are not available on Lookup relationships (unless you use third-party tools or Apex triggers). This is because the master-detail relationship guarantees tight coupling and cascading behavior. 2. Summary types: You can choose COUNT (number of child records), SUM (total of a numeric field), MIN (lowest value), or MAX (highest value). SUM, MIN, and MAX work on number, currency, and percent fields; MIN and MAX also work on date and date/time fields. 3. Filter criteria: You can restrict which child records are included by adding filter criteria, for example only summing Opportunities where Stage equals Closed Won. 4. Standard object support: Roll-ups are available on standard master-detail pairs such as Account to Opportunity, Opportunity to Opportunity Product, and Campaign to Campaign Member. 5. Limits: Each object allows up to 25 Roll-Up Summary Fields by default (can be raised by Salesforce Support to 40). Formula fields referencing other objects or certain functions (NOW, TODAY) cannot be summarized. 6. Behavior: Values recalculate automatically when child records are created, edited, deleted, or reparented. Changing the roll-up definition triggers a mass recalculation, which can take time on large data volumes. 7. Workflow and automation: Roll-up changes can fire validation rules, workflow rules, and Flows on the parent, which matters for automation design. For the exam, remember: master-detail only, four summary types, filters allowed, and the 25-field limit.
Roll-Up Summary Fields: The Complete Guide for the Salesforce Advanced Administrator Exam
Roll-Up Summary Fields are one of the most powerful declarative tools in Salesforce for aggregating child data on a parent record without writing a single line of code. For the Advanced Administrator exam, they sit squarely inside the Advanced Objects and Applications domain, and they are a favourite topic for scenario-based questions because they test whether you truly understand relationship types, data model design, and the boundaries between point-and-click and programmatic solutions. If you confuse when a roll-up summary is possible, which relationship it requires, or which functions it supports, you will lose easy marks. Mastering this topic also pays off in real-world work: a well-designed roll-up summary replaces reports, manual data entry, and custom code, and it keeps parent records accurate in real time.
What a Roll-Up Summary Field Is
A Roll-Up Summary Field is a read-only field on a master (parent) object that calculates a value based on the related detail (child) records. Think of it as a live, record-level report that Salesforce maintains for you. Every time a child record is created, edited, deleted, undeleted, or reparented, Salesforce automatically recalculates the roll-up on the parent.
Classic examples include:
• Total Amount of all Opportunity Products on an Opportunity
• Number of open Cases related to a custom Project object
• Most recent Payment Date across all Payment child records on an Invoice
• Sum of Closed Won Opportunity Amount on an Account
The Golden Rule: Master-Detail Only
Roll-Up Summary Fields can only be created on the master side of a master-detail relationship. A standard lookup relationship does not support roll-up summary fields. There are a handful of standard-object exceptions that the exam loves to test:
• Account can roll up Opportunities (even though this is technically a lookup).
• Opportunity can roll up Opportunity Products (Opportunity Line Items).
• Campaign can roll up Campaign Members.
Outside of these, if the relationship is a lookup, roll-up summaries are unavailable and you must consider converting the relationship to master-detail (only possible if every child record already has a parent value), or use a Flow, Apex trigger, or a tool such as Declarative Lookup Rollup Summaries (DLRS).
How Roll-Up Summary Fields Work
1. Supported Functions
There are exactly four roll-up types:
• COUNT – counts the number of detail records (optionally matching filter criteria). No field selection needed.
• SUM – adds up a number, currency, or percent field on the detail records.
• MIN – returns the lowest value of a number, currency, percent, date, or date/time field.
• MAX – returns the highest value of a number, currency, percent, date, or date/time field.
Note what is missing: there is no AVERAGE function. To get an average, create a SUM roll-up and a COUNT roll-up, then build a formula field that divides SUM by COUNT (wrapping it in an IF to avoid dividing by zero).
2. Fields That Can Be Summarized
You can summarize number, currency, percent, date, and date/time fields on the detail object. Formula fields on the detail can be summarized only if they do not reference other objects (no cross-object merge fields) and do not use dynamic functions such as TODAY(), NOW(), or $User. Text, picklist, checkbox, long text area, and lookup fields cannot be the summarized field, although many of them can be used in the filter criteria.
3. Filter Criteria
You can restrict which detail records are included by adding filter criteria, for example Stage equals Closed Won or Status not equal to Cancelled. Filters support picklists, checkboxes, text, numbers, and dates on the detail object. You cannot filter on cross-object fields, long text areas, or multi-select picklists.
4. Automatic Recalculation
Salesforce recalculates the roll-up whenever a qualifying detail record changes. If you ever suspect the value is stale (for example, after changing filter criteria or a data load behaving unexpectedly), you can use the Force a mass recalculation link on the field detail page. Note that large recalculations can take time, and the field detail page displays a message while recalculation is in progress.
5. Read-Only Behaviour
Roll-up summary values are calculated by the system and cannot be edited by users, regardless of profile or permission set. They display on page layouts, list views, reports, and can be referenced in formula fields, validation rules, approval processes, Flows, and other automation on the master object.
6. Interaction with Automation and Validation
Because a child change updates the parent, a roll-up summary change can trigger validation rules, workflow rules, and record-triggered Flows on the master record. Importantly, if a validation rule on the master fails because of the new roll-up value, the save of the detail record fails and the user sees the error. Values recalculated through the forced mass recalculation do not fire these rules.
7. Sharing and Security
Roll-up summaries run in system context. The parent value includes all matching child records, even ones the viewing user cannot see through sharing rules. Field-level security on the roll-up field itself controls who can view it.
8. Multi-Currency Considerations
In a multi-currency org, currency fields are converted to the master record's currency before being summed, using the org's conversion rates (dated exchange rates apply for Opportunities and Opportunity Products if Advanced Currency Management is enabled).
Key Limits and Restrictions
• 25 roll-up summary fields per object by default; Salesforce Support can raise this to 40.
• Roll-ups count toward the overall custom field limit on the object.
• You cannot convert a master-detail relationship to a lookup while a roll-up summary field exists on it; delete the roll-up first.
• You cannot delete a master-detail relationship field that is referenced by a roll-up summary.
• Once created, you cannot change the summarized object, but you can change the roll-up type, summarized field, and filter criteria (which triggers recalculation).
• Roll-ups cannot summarize across more than one relationship level directly (for example, Grandparent cannot summarize Grandchild without an intermediate field on the Parent).
• Not available on external objects or through indirect or external lookups.
• A roll-up summary field referenced in a formula field limits what else that formula can do; and roll-up fields cannot be used as filter criteria in another roll-up.
Roll-Up Summary vs. Alternatives
• Roll-Up Summary Field – master-detail (or the standard exceptions), COUNT/SUM/MIN/MAX, real-time, no code. First choice when available.
• Record-Triggered Flow – works on lookup relationships, supports complex logic and averages, but you must handle create, update, delete, and reparenting scenarios yourself.
• Apex Trigger – fully flexible but requires a developer and test coverage.
• Reports with Summary – good for analysis, but does not store a value on the record for use in list views, validation, or automation.
• DLRS or AppExchange tools – declarative roll-ups across lookups, but third-party.
Exam Tips: Answering Questions on Roll-Up Summary Fields
Tip 1 – Identify the relationship type first. Almost every roll-up question hinges on whether the relationship is master-detail or lookup. If the scenario says lookup, a roll-up summary is not the answer unless it is Account-Opportunity, Opportunity-Opportunity Product, or Campaign-Campaign Member. Watch for Account-to-Contact or Account-to-Case scenarios: those are lookups, so you need a Flow or Apex.
Tip 2 – Memorise the four functions. COUNT, SUM, MIN, MAX. If a question asks for an average, the correct answer involves a formula field dividing a SUM roll-up by a COUNT roll-up, or a Flow.
Tip 3 – Match data types to functions. SUM only works on number, currency, and percent. MIN and MAX additionally work on date and date/time. Earliest and latest date requirements point to MIN and MAX.
Tip 4 – Look for filter wording. Phrases such as only closed cases, exclude cancelled orders, or only this year's payments indicate filter criteria on the roll-up rather than a separate object or Flow.
Tip 5 – Know the error scenarios. If an administrator cannot convert master-detail to lookup, or cannot delete a relationship field, the cause is an existing roll-up summary field. If a user receives a validation error when saving a child record, consider that a validation rule on the parent is reacting to the updated roll-up value.
Tip 6 – Remember the limit numbers. 25 roll-ups per object by default, 40 with a Salesforce Support request. If a question says the admin cannot create another roll-up, the answer is to contact Salesforce Support or consolidate fields, not to change the relationship.
Tip 7 – Stale values mean recalculation. When roll-up values appear incorrect after a change to filters or a large data load, the fix is to use Force a mass recalculation, not to recreate the field.
Tip 8 – Prefer declarative over code. The exam generally rewards the simplest supported declarative solution. If a roll-up summary satisfies the requirement, it beats Flow, and Flow beats Apex. Only choose Apex when the question explicitly rules out declarative options.
Tip 9 – Watch for formula field traps. A roll-up can summarize a detail formula field only if that formula does not use cross-object references or dynamic functions like TODAY(). If a question describes summing a formula that references the parent, the roll-up will not be available.
Tip 10 – Eliminate distractors. Options that suggest users manually update a total, that a lookup relationship can have a roll-up on a custom object, or that roll-ups support AVERAGE or text concatenation are always wrong.
Quick Reference Summary
• Created on: master object of a master-detail relationship (plus Account/Opportunity, Opportunity/Opportunity Product, Campaign/Campaign Member).
• Functions: COUNT, SUM, MIN, MAX. No AVERAGE.
• Summarizable fields: number, currency, percent (SUM/MIN/MAX), date and date/time (MIN/MAX), compliant formula fields.
• Filter criteria: yes, on detail fields, no cross-object.
• Editable by users: no, always read-only.
• Limit: 25 per object, up to 40 via Support.
• Recalculation: automatic on child changes; manual via Force a mass recalculation.
• Blocks: converting master-detail to lookup and deleting the relationship field.
• Alternatives for lookups: Record-Triggered Flow, Apex, DLRS.
Internalise these rules and practise reading scenarios for the relationship type, the function required, and any filter or limit clues, and roll-up summary questions on the Advanced Administrator exam will become some of the most reliable points you earn.
Admin II - Roll-Up Summary Fields Example Questions
Test your knowledge of Roll-Up Summary Fields
Question 1
Universal Containers tracks Service Visits in a custom object related to Account through a lookup relationship. Sales managers want a field on each Account showing the total number of related visits, and the value must stay current as visits are added or removed. The Service Visit object has a Private org-wide default, and visits are owned and shared separately from their Accounts so that a field service team keeps independent access. Which solution should the administrator implement to meet every requirement?
Question 2
Cloud Kicks uses a custom Enrollment junction object. Enrollment has a master-detail relationship to Course and a lookup relationship to Student. Every existing Enrollment record has a Student value. Advisors now want each Student record to show how many Enrollments that student has, and the value must stay current as Enrollments are added or deleted. The administrator wants the simplest declarative solution. What should the administrator do?
Question 3
Universal Containers has a Budget object with a master-detail relationship to Expense. A roll-up summary field on Budget sums the Expense amounts. Finance requires that no Expense can be saved if it pushes the Budget's total above the Approved Amount field on Budget. Users often edit existing Expense amounts after creation, and the administrator wants the simplest declarative control that blocks both new and edited Expenses. Which solution should the administrator implement?