Question

Difficulty: HardObject Relationships (Lookup, Master-Detail, Many-to-Many)

An administrator needs to establish a custom data model for a medical research organization to link Clinical Trials (Clinical_Trial__c) with Investigational Drugs (Investigational_Drug__c). A single trial can involve multiple drugs, and a single drug can be evaluated across multiple trials. If a Clinical Trial record is deleted, all records linking that trial to its associated drugs must be automatically removed. Furthermore, users must possess Read/Write access on the parent Clinical Trial record in order to create, edit, or delete the link records between a trial and a drug. How should the administrator configure the data model to meet these requirements?

  1. Create a custom junction object with Master-Detail relationships to both Clinical Trial and Investigational Drug, and set the Sharing Setting on the Clinical Trial master-detail field to Read/Write.Answer
  2. B
    Create a custom junction object with Lookup relationships to both Clinical Trial and Investigational Drug, and configure a record-triggered flow to handle record deletion and security restrictions.
  3. C
    Create a Lookup relationship from Investigational Drug to Clinical Trial, and create a Roll-Up Summary field on Clinical Trial to calculate the total count of associated drugs.
  4. D
    Create a custom junction object with Master-Detail relationships to both objects, and set the Organization-Wide Default (OWD) sharing setting on the custom junction object to Private.

Answer

Create a custom junction object with Master-Detail relationships to both Clinical Trial and Investigational Drug, and set the Sharing Setting on the Clinical Trial master-detail field to Read/Write.
Creating a custom junction object with Master-Detail relationships to both parent objects models a many-to-many relationship and enables automatic cascading deletion. Setting the Sharing Setting attribute on the Master-Detail relationship field to Read/Write strictly enforces that users must hold Read/Write edit permissions on the parent Clinical Trial record to create, edit, or delete related junction records.

Step-by-Step Solution

1
Analyze relationship cardinality and deletion requirements.
Because a clinical trial can involve multiple drugs and a drug can belong to multiple trials, a many-to-many relationship modeled via a custom junction object is required. Automatic cascade deletion of junction records upon master deletion necessitates a Master-Detail relationship.
Master-Detail relationships automatically delete detail records when a master record is deleted.
2
Determine child record edit/delete security controls.
The Sharing Setting property on a Master-Detail relationship field specifies the minimum level of access required on the master record to create, edit, or delete child detail records.
Configuring the Sharing Setting on the Master-Detail field to Read/Write prevents users who only have Read access on the master Clinical Trial record from creating, editing, or deleting junction records.
3
Evaluate object sharing behavior.
Detail objects in Master-Detail relationships inherit access controls directly from their master records and do not possess independent Organization-Wide Defaults.
Master-Detail relationships govern security access implicitly through master parent records.

Key Concept

Junction Object Configuration and Master-Detail Sharing Settings
Estimated Time:2m 0s
Rate this question