At Albany Freight, a custom Shipment object and a custom Shipment Line object are currently joined by a lookup relationship. The operations manager needs the total weight of all Shipment Line records to appear automatically on the parent Shipment record. What should the administrator do to meet this requirement?
- ACreate a roll-up summary field on Shipment while keeping the existing lookup relationship in place.
- BAdd a formula field on Shipment that references and adds together the weight of each related Shipment Line.
- CCreate a roll-up summary field on the Shipment Line child object referencing its own weight value.
- DConvert the lookup relationship to a master-detail relationship, then create a roll-up summary field on Shipment. Correct
Why A is wrong: A roll-up summary is the right field type, but it cannot be created over a lookup relationship, so leaving the relationship as a lookup means the field type is not even available.
Why B is wrong: Formula fields evaluate on a single record and cannot aggregate values across a set of related child records, so they cannot total child weights.
Why C is wrong: A roll-up summary lives on the master (parent) side to aggregate children, so placing it on the child object does not surface a total on Shipment.
Why D is correct: Roll-up summary fields require a master-detail relationship, and once Shipment is the master the SUM roll-up can total the child weights automatically.