Soru

Zorluk: OrtaFormula Fields and Roll-Up Summary Fields

An administrator at a medical device company needs to display the total monetary value of all approved maintenance service records on the parent Asset object. Upon inspecting the schema, the administrator discovers that the Service_Contract__c custom object is connected to the Asset object via a lookup relationship. Which configuration change will allow the administrator to summarize the total monetary value directly on the Asset record?

  1. Convert the existing lookup relationship between Asset and Service_Contract__c into a master-detail relationship, then create a Roll-Up Summary field using the SUM function on the Asset object.Cevap
  2. B
    Create a standard Roll-Up Summary field directly on the Asset object using the existing lookup relationship to aggregate the total value.
  3. C
    Create a custom Formula field on the Asset object using the SUM() function to aggregate the maintenance value from the related lookup child records.
  4. D
    Delete the Asset record and recreate it as a child detail object under the Service_Contract__c master object so that cascading deletion rules populate the summary values automatically.

Cevap

Convert the existing lookup relationship between Asset and Service_Contract__c into a master-detail relationship, then create a Roll-Up Summary field using the SUM function on the Asset object.
Declarative roll-up summary fields in Salesforce require a master-detail relationship between the master (parent) and detail (child) objects. By converting the lookup relationship on the child object to a master-detail relationship, the administrator enables the ability to build a Roll-Up Summary field on the parent Asset object using the SUM aggregate function.

Adım Adım Çözüm

1
Identify relationship constraints for Roll-Up Summary fields
Recognize that native Roll-Up Summary fields are only available on the master side of a Master-Detail relationship.
Salesforce platform limits declarative roll-up summaries to Master-Detail object relationships.
2
Determine the required architectural change
Convert the lookup relationship on Service_Contract__c to a master-detail relationship targeting Asset.
Ensuring all child records have a populated master lookup value allows relationship conversion.
3
Create the Roll-Up Summary field
Define a new Roll-Up Summary field on Asset using the SUM aggregate function filtered for approved records.
This natively calculates and displays the aggregate monetary value on the parent Asset object.

Anahtar Kavram

Roll-up summary fields require a Master-Detail relationship between the parent and child objects.
Bu soruyu puanla