Soru

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

A Salesforce Administrator at an enterprise software firm needs to model a relationship between a custom Application__c object and a custom Security_Audit__c object. The business requires that deleting an Application__c record must automatically delete all associated Security_Audit__c records. Additionally, managers must be able to view the total count of completed Security_Audit__c records directly on the Application__c record page without using custom code. Which two configuration steps should the administrator take to fulfill these requirements? (Choose 2 answers)

  1. Create a Master-Detail relationship field on the Security_Audit__c object referencing the Application__c object.Cevap
  2. B
    Create a Lookup relationship field on the Security_Audit__c object and enable the 'Delete this record also' cascade deletion setting.
  3. Create a Roll-Up Summary field on the Application__c object using the COUNT function to aggregate related Security_Audit__c records.Cevap
  4. D
    Create a Roll-Up Summary field on the Security_Audit__c object to aggregate data from the parent Application__c record.

Cevap

The administrator must create a Master-Detail relationship field on the Security_Audit__c object pointing to Application__c, and create a Roll-Up Summary field on the Application__c object to count related audit records.
To satisfy both business requirements—automatic deletion of child records upon master deletion and Declarative aggregate calculations—a Master-Detail relationship must be implemented. Creating the Master-Detail relationship field on the Security_Audit__c object establishes Application__c as the master, enabling cascading deletes. Creating a Roll-Up Summary field on Application__c allows the administrator to count related audit records without custom code.

Adım Adım Çözüm

1
Determine the required relationship type for cascading deletion and roll-up capabilities.
Identify that Master-Detail relationships are required because deleting a Master automatically deletes detail records, and Master-Detail is mandatory for Roll-Up Summary fields.
Lookup relationships do not support native Roll-Up Summary fields or standard cascade deletion for custom objects.
2
Define the Master-Detail relationship on the child object.
Create the Master-Detail field on Security_Audit__c (detail) pointing to Application__c (master).
Relationship fields are defined on the child/detail object.
3
Create the aggregation field on the parent object.
Create a Roll-Up Summary field on Application__c using the COUNT summary type filtered for completed audit records.
Roll-Up Summary fields reside on the master object to aggregate child record data.

Anahtar Kavram

Master-Detail Relationships and Roll-Up Summary Fields
Bu soruyu puanla