A Salesforce Administrator at a commercial catering company needs to calculate the total weight of ingredients directly on the custom parent object, Catering_Order__c. The individual ingredient quantities are stored in records of a custom child object, Order_Component__c. Currently, Order_Component__c is linked to Catering_Order__c through a Lookup relationship. When attempting to create a new field on Catering_Order__c to sum the component weights, 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 Catering_Order__c?
- Convert the Lookup relationship on Order_Component__c to a Master-Detail relationship after ensuring all child records have a populated lookup value.Cevap
- BCreate a cross-object formula field on Catering_Order__c that references the sum of the weight field from related Order_Component__c records.
- CChange the Organization-Wide Default sharing setting on Order_Component__c to Controlled by Parent to automatically enable roll-up capabilities.
- DCreate a roll-up summary field on Order_Component__c and reference it on Catering_Order__c using a standard formula field.
Cevap
Convert the Lookup relationship on Order_Component__c to a Master-Detail relationship after ensuring all child records have a populated lookup value.
The correct action is to convert the Lookup relationship to a Master-Detail relationship. Roll-up summary fields can only be created on the master object in a Master-Detail relationship. Before converting an existing lookup field to a master-detail field, every existing detail record must have a populated value in that lookup field.
Adım Adım Çözüm
Anahtar Kavram
Roll-Up Summary Field Relationship Requirements