An administrator at a healthcare organization needs to design a data model connecting Patient (`Patient__c`) records with Medical Specialist (`Specialist__c`) records. A patient can consult with multiple specialists, and a specialist can treat multiple patients. The business requires that deleting a Patient or Specialist record automatically removes the related consultation record, and that aggregate metrics from consultation records are calculated directly on the Specialist record. Which TWO configuration steps should the administrator implement to fulfill these requirements? (Choose 2 answers)
- Create a custom junction object that contains Master-Detail relationship fields referencing both Patient and Specialist objects.Answer
- Create Roll-Up Summary fields on the Specialist object that aggregate calculation data from the child junction object records.Answer
- CCreate a custom junction object with Lookup relationships to both objects and create Roll-Up Summary fields on the Specialist object.
- DEstablish direct Lookup relationships on the Patient object referencing the Specialist object to allow records to persist after parent deletion.
Answer
The administrator must create a custom junction object with Master-Detail relationships to both the Patient and Specialist objects, and then create Roll-Up Summary fields on the Specialist object to calculate aggregate values from the junction object records.
To connect two objects in a many-to-many relationship, a custom junction object with two Master-Detail relationships is required. Master-Detail relationships natively enforce cascading record deletion when a parent record is deleted and enable the creation of Roll-Up Summary fields on the master object to calculate aggregate data from child records.
Step-by-Step Solution
Key Concept
Many-to-Many Relationships and Roll-Up Summary Capabilities