Pre-requisite: Account and Contact are in Master-Detail relationship. Both Account and Contact have two record types each, say Acc1 and Acc2 for Account and Con1 and Con2 for Contact. In the sharing settings for a Role, say MyRole, I have grant users of MyRole to view only records of Account of record type Acc1.

The OWD for Contact is currently Controlled By Parent.

Requirement: I now have to grant access to the Contact records for the users that fall in the role MyRole and for both the record types Con1 and Con2 but currently the OWD is controlled by Parent and the only records that will be shown to the users will be the children of the Accounts of record type Acc1.

How do I achieve this without making any changes for the restriction in Account record types for this particular role?

Edit: If I gave access to the users using Profiles with the Modify all and view all, then would I be able to access all the Contact records regardless of the OWD that is controlled by parent?

  • 1
    I believe what you are asking is not possible
    – o-lexi
    Commented Jul 6, 2017 at 17:08

1 Answer 1


If you provide modify all or view all access , this will open up access ie: the users who have this will have access to all records. Later if you need to restrict access as in there is another record type that you do not want to share , you will not be able to do so with modify all or view all access in place.

Instead create a criteria based sharing rule between record types you want to share , giving read/write or read only access as your business rules require.

So if you want to share contact records for myRole , select both record types in criteria (ie: step 3 in criteria based sharing rule) and for 'share with' (ie: step 4) set it as myRole

  • Thanks but I am not allowed to create any sharing rules for contact since the OWD is already set to controlled by parent. I do not want to change that because that would mess up the previous hierarchy. Commented Jul 6, 2017 at 11:57
  • What if contact has only two record types con1 and con2 and I want to give access to the users according the profiles? That means all the contact records can be viewed by the profiles I decide and that nearly meets the requirement. But I think that would restrict the users which fall under the role but not under the profiles, right? Commented Jul 6, 2017 at 12:03
  • Its very tempting to use modify all or view all , but have you tried adding a record into contactShare table or sharing using apex developer.salesforce.com/docs/atlas.en-us.apexcode.meta/… Commented Jul 6, 2017 at 12:14
  • Well profile will give you CRUD level access on the object and sharing will give you record level access. Sharing is nothing but filtering through ownerid field and to make this happen access records are created in <object>Share tables. But since Access on contact is set as managed by parent you cannot create sharing rules from UI. Sharing can be created at account level , will that suffice your use case Commented Jul 6, 2017 at 12:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .