Cert++
Close

Junction object primary master and sharing

Key Takeaway

The first master-detail relationship you create on a junction object becomes the primary master. Junction records have no sharing of their own, so the "Sharing Setting" on each of the two master-detail fields sets the access a user needs on that master to create, edit, or delete junction records.

A junction object is a custom object with two master-detail relationships that links two other objects in a many-to-many relationship. The order in which you create those relationships matters, because the primary master sets the look, owner, and division of junction records. Junction records get their access from the master records rather than from sharing of their own. As a result, what a user can do with a junction record depends on their access to the master records.

What a junction object is

You build a many-to-many relationship with a junction object: a custom object with one master-detail relationship field to each of the two objects. For example, a BugCaseAssociation object can link Bug and Case. A bug can then relate to many cases, and a case can relate to many bugs.

A food bank tracks volunteers and shifts in two custom objects, Volunteer and Shift. One volunteer works many shifts, and one shift needs many volunteers. The admin creates a Shift Signup custom object with one master-detail relationship field to Shift and another to Volunteer. Each Shift Signup record links one volunteer to one shift. Sam Lee can have signups for three different shifts, and the Saturday morning shift can have signups from ten volunteers.

Each custom object can have up to two master-detail relationships and up to 40 total relationships. A junction object uses both of its master-detail relationships, so it can't take a third master.

Platform Administrator II Study Guide

Checklist progress

0/290Learned

Given a scenario, determine the appropriate solution to enhance or extend objects (master-detail, lookup, junction object, related list, record type, Schema Builder, and Object Creator)

0/15

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Platform Administrator II studiers. 757 members and growing.