Soru

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

An administrator at a non-profit organization needs to design a data model connecting Grant Programs (`Grant_Program__c`) and Grant Applications (`Grant_Application__c`). The organization requires that deleting a Grant Program record automatically removes all related Grant Application records. Additionally, the administrator must display the total count of submitted applications directly on the parent Grant Program record without writing custom code. Which TWO actions must the administrator take to accomplish this? (Select 2 answers)

  1. Create a Master-Detail relationship field on the Grant Application object that references the Grant Program object.Cevap
  2. Create a Roll-Up Summary field on the Grant Program object using the COUNT aggregate function on related Grant Applications.Cevap
  3. C
    Create a Lookup relationship field on the Grant Application object and enable cascade deletion in the field settings.
  4. D
    Create a Roll-Up Summary field on the Grant Application object referencing the Grant Program object.

Cevap

The administrator must create a Master-Detail relationship field on the Grant Application object referencing the Grant Program object, and create a Roll-Up Summary field on the Grant Program object using the COUNT function.
To satisfy both the cascade deletion requirement and the automatic count calculation on the parent object without custom code, a Master-Detail relationship must be configured on the child object (`Grant_Application__c`) pointing to the parent (`Grant_Program__c`). Furthermore, a Roll-Up Summary field must be added to the master object (`Grant_Program__c`) using the COUNT function.

Adım Adım Çözüm

1
Analyze the relationship deletion and aggregation requirements
Requirements specify cascade deletion and record count aggregation on the parent record
Master-Detail relationships are required whenever parent deletion must trigger detail deletion and when native Roll-Up Summary fields are needed.
2
Define the relationship field location and type
Place a Master-Detail relationship field on the child object (`Grant_Application__c`) pointing to `Grant_Program__c`
Relationship fields are always created on the detail/child object in Salesforce.
3
Configure the aggregation field on the parent object
Create a Roll-Up Summary field on `Grant_Program__c` using the COUNT operation
Roll-Up Summary fields exist on the master object to aggregate metrics from detail records.

Anahtar Kavram

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