Soru

Zorluk: OrtaObject Relationships (Lookup, Master-Detail, Many-to-Many)

A Salesforce Administrator needs to configure a custom data model to track Customer Refunds on a custom object named Invoice__c. The business requirement states that every Refund__c record must strictly belong to an Invoice__c record, and if an Invoice__c is deleted, all associated Refund__c records must be automatically deleted. Furthermore, finance managers must be able to view the sum of all refund amounts directly on the Invoice__c detail page. Which configuration should the administrator implement to meet these requirements?

  1. Create a Master-Detail relationship field on Refund__c referencing Invoice__c, and create a Roll-Up Summary field on Invoice__c to aggregate the refund amounts.Cevap
  2. B
    Create a Lookup relationship field on Refund__c referencing Invoice__c, and create a Roll-Up Summary field on Invoice__c to aggregate the refund amounts.
  3. C
    Create a Lookup relationship field on Refund__c referencing Invoice__c, and rely on standard lookup deletion behavior to remove related Refund__c records.
  4. D
    Create a Master-Detail relationship field on Invoice__c referencing Refund__c, and create a Roll-Up Summary field on Refund__c to aggregate the total invoice values.

Cevap

Create a Master-Detail relationship field on Refund__c referencing Invoice__c, and create a Roll-Up Summary field on Invoice__c to aggregate the refund amounts.
Defining a Master-Detail relationship field on the child object (Refund__c) referencing the parent (Invoice__c) ensures that deleting an Invoice__c automatically deletes all related Refund__c records. This relationship type also enables the administrator to build a declarative Roll-Up Summary field on Invoice__c to calculate the sum of refund amounts.

Adım Adım Çözüm

1
Analyze deletion requirements
Identify that automatic cascade-deletion of child records requires a Master-Detail relationship on the child object.
Lookup relationships retain child records unless complex custom automation is implemented, whereas Master-Detail handles cascade deletion natively.
2
Analyze summarization requirements
Determine that native Roll-Up Summary fields aggregate data from child records onto a parent record.
Roll-Up Summary fields are a standard declarative feature available exclusively on the master side of a Master-Detail relationship.
3
Select correct field placement
Place the Master-Detail relationship custom field on Refund__c pointing to Invoice__c.
Custom relationship fields are always defined on the child/detail object.

Anahtar Kavram

Master-Detail relationships dictate record ownership, sharing, and cascade-deletion behavior, and are mandatory prerequisites for creating declarative Roll-Up Summary fields on parent records.
Bu soruyu puanla