Let's say you have a child object Child__c that has 2 master-detail relationships and assume you don't have Modify/View All access to the child object or overall. Also assume that all object OWDs are set to Private.

Do you need to get access to both of the parent records - through whatever means - in order to access the child record?

I have tested and this seems to be the case but it would be great to see this in the official documentation.


As far as I know you can't have more than 2 master-detail relationships on 1 object, whenever you create more than one, you make what salesforce calls a 'junction object' which gives you the ability to create an many-to-many relationship.

Salesforce documented the way sharing settings work on junction objects quite well.

The first master-detail relationship you create on your junction object becomes the primary relationship. This affects the following for the junction object records:

  1. Look and feel: The junction object's detail and edit pages use the color and any associated icon of the primary master object.
  2. Record ownership: The junction object records inherit the value of the Owner field from their associated primary master record. Because objects on the detail side of a relationship do not have a visible Owner field, this is only relevant if you later delete both master-detail relationships on your junction object.
  3. Division: If your organization uses divisions to segment data, the junction object records inherit their division from their associated primary master record. Similar to the record ownership, this is only relevant if you later delete both master-detail relationships.

I'd recommend reading the documentation for the rest of the specifics

In case you have the wrong master-detail relationship as the primary relationship, you can easily fix this. By temporary changing your current primary master-detail to a lookup, and changing it back.

| improve this answer | |
  • 1
    From the docs "Sharing access to a junction object record is determined by a user's sharing access to both associated master records and the Sharing Setting option on the relationship field. See Custom Object Security. For example, if the sharing setting on both parents is Read/Write, then the user must have Read/Write access to both parents in order to have Read/Write access to the junction object. If, on the other hand, the sharing setting on both masters is Read-Only, a user with Read-Only rights on the master records would have Read/Write access to the junction object." Thanks! – Wes Nolte Apr 16 '13 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.