Question

Difficulty: MediumObject Relationships (Lookup, Master-Detail, Many-to-Many)

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?

  1. 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
  2. B
    Maintain the Lookup relationship and change the Organization-Wide Default on Package__c to Controlled by Parent to unlock Roll-Up Summary functionality.
  3. C
    Create the Roll-Up Summary field on the child Package__c object instead of the parent object to summarize data across the relationship.
  4. D
    Delete 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

1
Identify the relationship requirements for Roll-Up Summary fields
Determine that Roll-Up Summary fields can only be created on the parent object in a Master-Detail relationship, not in a Lookup relationship.
Salesforce architecture mandates a Master-Detail relationship for native Roll-Up Summary fields.
2
Verify existing child data cleanliness before relationship conversion
Ensure 100% of existing Package__c records contain a valid reference in the Shipment__c lookup field.
Salesforce prevents converting a Lookup relationship field to a Master-Detail relationship if any existing child record lacks a parent relationship value.
3
Convert the relationship type and create the Roll-Up Summary field
Change the field type of the relationship field on Package__c to Master-Detail, then create the Roll-Up Summary field on Shipment__c.
Once converted, the parent object enables the Roll-Up Summary field type in Object Manager.

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.
Rate this question