An administrator at a professional services firm needs to display the aggregate total of billable hours from child Time_Entry__c records on the parent Consulting_Engagement__c object. The two custom objects are currently connected via a Lookup relationship. When attempting to create a Roll-Up Summary field on Consulting_Engagement__c, the administrator notices that the Roll-Up Summary field type is disabled in the setup wizard. Upon investigating the data, several existing Time_Entry__c records have a blank Consulting_Engagement__c lookup field. What sequence of actions must the administrator take to successfully create the Roll-Up Summary field on Consulting_Engagement__c?
- Populate the Consulting_Engagement__c lookup field on all existing child Time_Entry__c records, convert the relationship field on Time_Entry__c from Lookup to Master-Detail, and then create the Roll-Up Summary field on Consulting_Engagement__c.Cevap
- BCreate a cross-object formula field using the SUM() function directly on the Consulting_Engagement__c object while maintaining the existing Lookup relationship.
- CConvert the relationship on Time_Entry__c to Master-Detail immediately without populating blank lookup values, as Salesforce automatically populates blank parent fields upon conversion.
- DDelete the parent Consulting_Engagement__c records with unlinked children to bypass field validation and force automatic master-detail recalculation.
Cevap
Populate the Consulting_Engagement__c lookup field on all existing child Time_Entry__c records, convert the relationship field on Time_Entry__c from Lookup to Master-Detail, and then create the Roll-Up Summary field on Consulting_Engagement__c.
The option stating that all existing child records must have their lookup field populated prior to converting the relationship from Lookup to Master-Detail correctly follows Salesforce architecture requirements. Roll-Up Summary fields are exclusively available on the master side of Master-Detail relationships. To convert an existing Lookup field to a Master-Detail field, every existing detail record must contain a populated reference to a master record.
Adım Adım Çözüm
Anahtar Kavram
Roll-Up Summary Relationship Requirements and Conversion Prerequisites