Soru

Zorluk: OrtaStandard and Custom Object Management

An administrator at a corporate event planning company needs to configure a relationship between the standard Account object and a custom object named Vendor_Contract__c. The business requirement states that deleting an Account record must automatically delete all associated Vendor_Contract__c records. In addition, management requires a roll-up summary field on the Account object to summarize total contract values. Which relationship configuration should the administrator implement?

  1. Create a Master-Detail relationship on Vendor_Contract__c with Account as the master object.Cevap
  2. B
    Create a Lookup relationship on Vendor_Contract__c to Account and configure a standard roll-up summary field on Account.
  3. C
    Create a Master-Detail relationship on Account with Vendor_Contract__c as the master object to protect detail records from deletion.
  4. D
    Create a Lookup relationship on Vendor_Contract__c and use Dynamic Forms component visibility to handle record deletion and summaries.

Cevap

Create a Master-Detail relationship on Vendor_Contract__c with Account as the master object.
Creating a Master-Detail relationship on the child object (Vendor_Contract__c) with Account as the master fulfills both business requirements. In a Master-Detail relationship, deleting a master record automatically deletes all associated detail records, and master objects support standard roll-up summary fields to aggregate detail record values.

Adım Adım Çözüm

1
Analyze the deletion cascade and summary requirements.
The requirements demand that parent record deletion cascades to detail records and that the parent object supports roll-up summary fields.
Master-Detail relationships natively enforce cascading deletion from master to detail records and enable roll-up summary fields on the master object.
2
Determine object placement for the relationship field.
The custom relationship field must be created on the child object (Vendor_Contract__c) pointing to the parent object (Account).
In Salesforce data modeling, the child detail record always holds the foreign key relationship field to the parent master record.

Anahtar Kavram

Master-Detail Relationship Capabilities and Limitations
Bu soruyu puanla