A company tracks software feature requests using a custom child object named Enhancement_Request__c, which currently connects to a custom parent object, Product_Module__c, through a Lookup relationship. The product management team requires real-time count metrics on Product_Module__c to track total feature requests. When the Salesforce Administrator attempts to convert the existing Lookup relationship field into a Master-Detail relationship field to build a Roll-Up Summary field, Setup returns an error preventing the schema change. What is the root cause of this error, and how should the administrator resolve it?
- Existing child records contain null values in the Lookup field; the administrator must populate the lookup field on all existing Enhancement_Request__c records before converting the data type.Answer
- BRoll-Up Summary fields are unsupported on custom objects converted from lookup fields; the administrator must delete the lookup field and create a new Master-Detail field from scratch.
- CChild records will automatically be permanently deleted if the parent object OWD is altered; the administrator must export and delete all child records prior to changing the relationship type.
- DThe child object's Organization-Wide Default setting is set to Private; the administrator must change the Organization-Wide Default of Enhancement_Request__c to Controlled by Parent prior to field conversion.
Answer
Populate the Lookup field on all existing child records with a valid parent record reference, then convert the lookup field to a master-detail relationship.
To convert an existing Lookup relationship to a Master-Detail relationship, every existing record on the child object must contain a populated value in the lookup field. Because Master-Detail relationships strictly enforce parent record reference requirements (detail records cannot exist without a master), Salesforce prevents field conversion if any child record has a blank/null lookup value. Populating these records allows the conversion to complete successfully, which in turn enables the creation of Roll-Up Summary fields on the parent object.
Step-by-Step Solution
Key Concept
Converting Lookup Relationships to Master-Detail Relationships
Estimated Time:2m 0s