An administrator needs to enable roll-up summary fields on the custom object Project__c to aggregate financial metrics from a related child custom object, Project_Milestone__c. Currently, Project_Milestone__c has an existing Lookup relationship to Project__c with existing records in the organization. The administrator also needs to ensure that deleting a Project__c record automatically deletes all related Project_Milestone__c records. Which TWO actions must the administrator take to fulfill these requirements? (Choose 2 answers)
- Populate the Project__c lookup field on all existing Project_Milestone__c records.Cevap
- Change the relationship field type on Project_Milestone__c from Lookup to Master-Detail.Cevap
- CCreate roll-up summary fields directly on Project__c while maintaining the Lookup relationship.
- DBuild a custom Apex trigger to delete child records because Master-Detail relationships do not support cascading deletion.
Cevap
The administrator must populate the lookup field on all existing child records and then convert the relationship field type from Lookup to Master-Detail.
To create roll-up summary fields and inherit cascading delete behavior, the relationship must be converted from Lookup to Master-Detail. Salesforce requires all existing child records to have a populated parent lookup field before this conversion can take place.
Adım Adım Çözüm
Anahtar Kavram
Converting Lookup to Master-Detail relationships and prerequisites for roll-up summary functionality