Short answer
No — not reliably. A roll-up summary (up-summary) on a parent record can summarize formula fields on child records, but if those child formula fields reference another object (a cross-object formula), the roll-up summary will not automatically update when the referenced object changes. Roll-up summary fields only recalculate when the child records themselves change.
Why this happens
Roll-up summary fields recalculate when related child records are created, updated, or deleted. If a child record contains a formula that pulls a value from some other unrelated record (for example, via a lookup), changing that unrelated record doesn’t trigger an update on the child record — the formula value changes on the fly in the UI, but Salesforce doesn’t perform a DML update to the child record. Since no child DML occurs, the roll-up summary isn’t notified to recompute.
When it does work
You can summarize a child formula field in a roll-up summary if the formula value depends only on the child record or on fields that cause DML on the child. Examples that work as expected:
- Formulas using only fields on the child record
- Formulas that reference the parent via a master-detail or lookup where changes to the parent cause a child update (rare)
Common workarounds and solutions
If you need the roll-up summary to reflect changes to another object referenced by child formulas, use one of these approaches:
1) Use an Apex trigger or Flow on the referenced object
Add a trigger (or record-triggered Flow) on the referenced object so that when the referenced field changes, you perform a lightweight update to the child records (for example, touch a hidden checkbox or set a dummy field) to force child DML. That DML will cause the roll-up summary to recalculate.
// Apex trigger example (simplified)
trigger UpdateChildOnReferenceChange on Referenced__c (after update) {
Set
for (Referenced__c r : Trigger.new) {
if (r.InterestingField__c != Trigger.oldMap.get(r.Id).InterestingField__c) {
refIds.add(r.Id);
}
}
if (!refIds.isEmpty()) {
// Query children that reference these records (lookup)
List
for (Child__c c : children) c.DummyTick__c = !c.DummyTick__c; // toggle to force update
update children;
}
}
2) Use Declarative Lookup Rollup Summaries (DLRS)
DLRS is a managed tool that supports roll-ups across lookup relationships and can be configured to recalculate on schedule or via apex trigger. DLRS can avoid custom code in many scenarios.
3) Use Scheduled Batch / Scheduled Flow
Periodically recalculate roll-ups with a scheduled Apex job or scheduled Flow that aggregates child values and writes the result to the parent. Useful when near-real-time accuracy is not required.
4) Reconsider data model
If roll-up behavior is critical and must be real-time, consider adjusting relationships (use master-detail if appropriate), or denormalize the frequently-changed value onto the child so that direct updates are possible.
Best practices
- Avoid relying on cross-object formulas for values that must trigger roll-up recalculation unless you implement a mechanism to force child updates.
- Prefer record-triggered Flows for simple declarative automation to touch child records when a referenced value changes.
- Measure performance and bulkify your Apex/Flow logic when touching large numbers of child records.
- When using DLRS, choose trigger mode or scheduled mode depending on real-time needs.
Conclusion
While roll-up summary fields can include formula fields on child records, they won’t reliably update when those formulas depend on values from a different object. To ensure accurate roll-ups, implement an explicit recalculation strategy (trigger, Flow, DLRS, or scheduled job) or change the data model so the dependency is direct.






Leave a Reply