Soru

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

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)

  1. Create a custom junction object that contains Master-Detail relationship fields referencing both Patient and Specialist objects.Cevap
  2. Create Roll-Up Summary fields on the Specialist object that aggregate calculation data from the child junction object records.Cevap
  3. C
    Create a custom junction object with Lookup relationships to both objects and create Roll-Up Summary fields on the Specialist object.
  4. D
    Establish direct Lookup relationships on the Patient object referencing the Specialist object to allow records to persist after parent deletion.

Cevap

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.

Adım Adım Çözüm

1
Analyze data model requirements for many-to-many structure and deletion behavior.
Determined that a junction object with two Master-Detail relationship fields is required to connect Patient and Specialist objects and enforce automatic deletion of junction records.
Master-Detail relationships enable cascading deletion, ensuring child records are automatically removed when either parent record is deleted.
2
Evaluate field capability for aggregate calculations on the master object.
Confirmed that Roll-Up Summary fields can be created on the master object (Specialist) referencing the child junction object.
Roll-Up Summary fields require a Master-Detail relationship and cannot be constructed over standard Lookup relationships.

Anahtar Kavram

Many-to-Many Relationships and Roll-Up Summary Capabilities
Bu soruyu puanla