Question

Difficulty: MediumCustom Fields and Data Types

A Salesforce administrator at a maritime shipping firm needs to convert an existing Lookup relationship field on the custom object Cargo_Container__c to a Master-Detail relationship with the Vessel__c object to enable summary reporting. When attempting to convert the field data type in Object Manager, Salesforce prevents the change. Which action must the administrator take to successfully complete the data type conversion?

  1. Populate the Lookup field on all existing Cargo_Container__c records so that no record contains a null value.Answer
  2. B
    Create a Roll-Up Summary field directly on the Vessel__c object referencing the existing Lookup relationship.
  3. C
    Configure Lead custom field mapping to link the Cargo_Container__c field to the Vessel__c object.
  4. D
    Assign the Lookup field to all available Record Types on the Cargo_Container__c object layout.

Answer

The administrator must populate the Lookup field on all existing child records (Cargo_Container__c) so that no record contains a blank/null value before converting the field data type to a Master-Detail relationship.
In Salesforce, converting a Lookup relationship to a Master-Detail relationship requires that every existing record on the detail custom object has a populated value in the lookup field. If any record has a null value, the system blocks the conversion to maintain mandatory relationship integrity.

Step-by-Step Solution

1
Identify the data type conversion prerequisites for Salesforce relationship fields.
Converting a Lookup relationship to a Master-Detail relationship requires that all existing records on the detail object contain a valid parent record reference.
Master-Detail relationships strictly enforce data integrity, requiring mandatory parent references on all child records.
2
Audit existing records on the child object (Cargo_Container__c).
Locate records where the Vessel__c lookup field is blank.
If any child record lacks a value, Salesforce blocks the data type conversion.
3
Populate missing values and complete the conversion.
Update all blank lookup fields with valid Vessel__c record references and convert the data type in Object Manager.
Once all child records are populated, Salesforce permits changing the relationship type to Master-Detail.

Key Concept

Converting Lookup Relationships to Master-Detail Relationships
Rate this question