A Salesforce Administrator at a freight company needs to calculate the total combined weight of all child Package__c records on their parent Shipment__c record. Currently, Package__c shares a Lookup relationship with Shipment__c. When attempting to create a Roll-Up Summary field on Shipment__c, the administrator notices that the Roll-Up Summary field type is disabled. What action should the administrator take to allow the creation of the Roll-Up Summary field on Shipment__c?
- Convert the existing Lookup relationship on Package__c to a Master-Detail relationship after ensuring all existing Package__c records have a parent Shipment__c populated.Answer
- BMaintain the Lookup relationship and change the Organization-Wide Default on Package__c to Controlled by Parent to unlock Roll-Up Summary functionality.
- CCreate the Roll-Up Summary field on the child Package__c object instead of the parent object to summarize data across the relationship.
- DDelete the existing Lookup relationship field and immediately recreate it as a Master-Detail relationship to automatically re-link orphaned child records.
Answer
Convert the existing Lookup relationship on Package__c to a Master-Detail relationship after ensuring all existing Package__c records have a parent Shipment__c populated.
Roll-Up Summary fields are only available on the parent object of a Master-Detail relationship. To convert an existing Lookup relationship to a Master-Detail relationship, all existing child records must have a populated value in the lookup field.
Step-by-Step Solution
Key Concept
Roll-Up Summary fields are exclusively available on the master object in a Master-Detail relationship. Converting an existing Lookup field to a Master-Detail field requires every existing child record to have a populated parent lookup value.