Salesforce Certified Platform Administrator free question 3 / 10 · Domain 2: Object Manager and Lightning App Builder
The junction object Course Enrollment has two master-detail relationships, to Course and to Student, and the Sharing Setting of both relationship fields is Read/Write. A user has Read/Write access to a particular Course record but only Read access to its Student record. According to Help, can this user update the Course Enrollment record associated with the two?
- Updating a junction record requires Modify All on both parents, so this user cannot update the record
- Because the Sharing Setting of the relationship fields is Read/Write, the user can update it whatever access the user has to the course and student
- If the user owns the Course Enrollment record, the user can update it even with only Read access to the student
- Read/Write access is required on both the course and the student, so this user, who has only Read on the student, cannot update the record
Show the answer and explanation
Answer: D
Why this is correct
The Help considerations for relationships say that shared access to a junction object record is determined by the combination of the user's access to the two related master records and the Sharing Setting of the relationship fields. As the example shows, when the Sharing Setting of both parents is Read/Write, a user needs Read/Write access to both parents to work with the junction record at Read/Write. When both are Read-Only, a user with Read-Only access to the master records can access the junction record at Read. This user has only Read on the student, so cannot update the Course Enrollment record.
Why the other options are wrong
"If the user owns the Course Enrollment record, the user can update it even with only Read access to the student" … The article says access to a junction record is determined by access to both master records and the Sharing Setting of the relationship fields. Owning the junction record is not among the conditions, and ownership does not make up for the Read-only access on the student side.
"Because the Sharing Setting of the relationship fields is Read/Write, the user can update it whatever access the user has to the course and student" … The Sharing Setting is an attribute that decides which sharing access to the master record is needed to create, edit, or delete the detail record. The setting does not allow the update by itself; the result comes from combining it with the access to the master records.
"Updating a junction record requires Modify All on both parents, so this user cannot update the record" … The article's example is that when the Sharing Setting of both parents is Read/Write, Read/Write access to both parents is enough to work with the junction record at Read/Write. Modify All is not required. The conclusion that the user cannot update is the same, but the reason is that the student side is Read only.
Design point
The Sharing Setting is an attribute of each of the two master-detail relationships, and in a many-to-many design both settings take effect together. If you want a user to be able to update junction records, design the access so the user has the required access on both parents. Access to only one parent is not enough to update a junction record.