Platform
Roll-up summaries without master-detail: choose the right approach
Compare lookup roll-up options and test deletes, reparenting, concurrent changes and reconciliation before trusting stored totals.
A sum across a lookup relationship needs more than an update flow. Deleting or moving a child can change the total too.
Native roll-up summary fields are designed for supported master-detail relationships. For a lookup, evaluate a maintained roll-up tool, Flow, Apex or a reporting-only calculation according to the required behavior.
Start with freshness and ownership
Decide whether the total must be stored on the parent and how quickly it must reflect a change. A report may satisfy an analytical question without introducing another stored value. A total used by validation or downstream automation needs a stricter contract.
Also define who can see the aggregate. A parent total can reveal information about children the viewer cannot access. Review field permissions and the calculation’s execution context with the data owner.
| Approach | Suitable starting point | Work you still own |
|---|---|---|
| Reporting calculation | Read-only analysis | Filter consistency and access |
| DLRS | Configured lookup aggregates | Package review, scheduling and testing |
| Flow | A bounded, understood process | Every relevant change path and volume |
| Apex | Complex or high-control logic | Concurrency, limits and maintenance |
DLRS documentation describes the community-maintained lookup roll-up package and its operating options. Evaluate the current release, support model and permissions before installing it; it isn’t a native field type.
Define every event that changes the total
The calculation must account for child creation, amount changes, filter changes, deletion and reparenting. When a child moves, both the old and new parent may need recalculation. Include undelete if it is part of the supported process.
Prefer recomputing from authoritative children where appropriate rather than repeatedly adding and subtracting values without a recovery path. Incremental updates can drift after missed events or concurrent writes.
Bulk imports also matter. Recalculating the same parent for every child can create repeated work and record-lock pressure. Group affected parents and choose a transaction strategy that fits the volume.
Keep a repair operation available
Plan an initial backfill and a repeatable reconciliation job. Compare stored totals with authoritative child records and report differences. A repair mechanism is useful even when real-time processing normally succeeds.
Test an empty parent, one child, excluded children, reparenting, deletion and bulk changes. Add concurrent-change testing in an appropriate environment when multiple writers can affect the same parent.
Avoid converting a lookup to master-detail solely to obtain a roll-up without reviewing the relationship’s ownership and deletion consequences. The relationship model is a business decision as well as a calculation convenience.