Question

Difficulty: MediumFormula Fields and Roll-Up Summary Fields

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?

  1. Convert the Lookup relationship on Order_Component__c to a Master-Detail relationship after ensuring all child records have a populated lookup value.Answer
  2. B
    Create a cross-object formula field on Catering_Order__c that references the sum of the weight field from related Order_Component__c records.
  3. C
    Change the Organization-Wide Default sharing setting on Order_Component__c to Controlled by Parent to automatically enable roll-up capabilities.
  4. D
    Create a roll-up summary field on Order_Component__c and reference it on Catering_Order__c using a standard formula field.

Answer

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.

Step-by-Step Solution

1
Identify the relationship requirement for Roll-Up Summary fields.
Determine that Roll-Up Summary fields are supported exclusively on the master object of a Master-Detail relationship.
Lookup relationships do not support native declarative roll-up summary fields on the parent object.
2
Evaluate prerequisite steps for converting a Lookup relationship to a Master-Detail relationship.
Ensure that every existing child record (Order_Component__c) has a value in the parent lookup field.
Master-Detail relationships enforce data integrity by requiring all detail records to have a valid reference to a master record.
3
Change the field type of the lookup field to Master-Detail and create the Roll-Up Summary field.
The Roll-Up Summary field type becomes selectable on Catering_Order__c to perform SUM operations on child records.
Converting the field establishes the required master-detail relationship structure.

Key Concept

Roll-Up Summary Field Relationship Requirements
Rate this question