Courseiva

SF-Admin Object Manager and Lightning App Builder Practice Question

An administrator is building a Lightning record page for the Opportunity object. The sales team wants a component that shows a count of related Opportunity Line Items and the total of their line amounts, updating automatically as line items change. The administrator wants to avoid custom code. Which approach should the administrator take?

⚠ Common exam trap

The trap here is assuming formula fields or the Related List component can aggregate child records, when only roll-up summary fields can roll up master-detail children declaratively.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Create roll-up summary fields on the Opportunity for count and sum of Opportunity Line Items, then add those fields to the page layout.

Opportunity Line Items have a master-detail relationship with Opportunity, which makes roll-up summary fields available on the parent. A roll-up summary configured to COUNT the line items and SUM the line amount provides both values the sales team wants, updates automatically when line items change, and requires no code. The other approaches either cannot aggregate child records, lack the sum capability, or produce a report visualization instead of a field value.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Add a Report Chart component filtered to the current Opportunity and configure it to display the line item sum.

    Why it's wrong here

    The Report Chart component displays a chart from a report and can be filtered by the current record, but it renders a visual chart rather than a simple count and sum value. It also depends on a report being built and refreshed, and it does not update as seamlessly as a roll-up summary field. This is a reporting visualization, not the declarative aggregate the requirement asks for.

  • ✗

    Create a formula field on the Opportunity that references the Opportunity Line Items related list.

    Why it's wrong here

    Formula fields cannot reference related lists or aggregate child records. A formula on the Opportunity can only use fields on the same record or traverse parent lookups, not roll up child records. Cross-object formulas go upward to a parent, not downward to children, so this approach cannot count or sum Opportunity Line Items and is not viable.

  • ✓

    Create roll-up summary fields on the Opportunity for count and sum of Opportunity Line Items, then add those fields to the page layout.

    Why this is correct

    Roll-up summary fields on the Opportunity can count related Opportunity Line Items and sum their line amounts, because Opportunity Line Items are a child object in a master-detail relationship with Opportunity. These fields update automatically as line items change, require no custom code, and can be placed on the page layout or a component. This is the standard declarative solution for the requirement.

  • ✗

    Add the Related List component and enable the 'Show Record Count' and 'Show Sum of Amount' options.

    Why it's wrong here

    The Related List component can display a related list and optionally show a record count, but it does not provide a built-in sum of a numeric field on the child records. There is no standard 'Show Sum of Amount' toggle in the Related List component configuration. This approach would show the list and count but fail to display the summed line amounts the sales team requested.

About these practice questions

This SF-Admin question is part of Courseiva's 202-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Salesforce exam blueprint

This SF-Admin practice question is part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SF-Admin exam.