4

I was going reading through this documentation Designing Record Access for Enterprise Scale and trying to find out how Controlled by Parent sharing works.

For one of performance tuning options documentation states that:

To avoid creating implicit shares, configure child objects to be Controlled by Parent wherever this configuration meets security requirements.

And as per my understanding:

  • For Master-Detail relationship Controlled by Parent is applicable and in that scenario ChildShare object will not hold any records.
  • And if OWD of Parent is NOT Public Read/Write then it could have share records depending on role hierarchy, territory hierarchy and queues.
  • Implicit sharing is not applicable for Custom objects.

Does the ParentShare record govern the sharing of Child's share under the hood for Controlled by Parent?

Any documentation or link on this understanding is appreciated.

  • You are right here that ParentShare governors the sharing of the child records as well when the Security setting is set to controlled By Parent.Its not well documented anywhere .Implicit sharing is only for few standard objects and setting "controlled By parent" avoids creating childshare records and parentShare manages everything just treating like master detail for sharing purposes . – Mohith Shrivastava Jul 2 '17 at 3:54
  • If so then how Salesforce figures out that settings is Control By Parent and when sharing could drive from parent? – Santanu Boral Jul 2 '17 at 4:14
  • OWD metadata should tell the sharing and then metadata again should reveal the parentId field and the parent object .from child object , sfdc grabs parentId and looks for same in ParentShare Table .Again its not documented anywhere but logically thats what one can imagine – Mohith Shrivastava Jul 2 '17 at 4:22
  • Can you add this comments as answer – Santanu Boral Jul 2 '17 at 23:03
  • I have added as answer . – Mohith Shrivastava Jul 2 '17 at 23:53
2

You are right here that ParentShare governors the sharing of the child records as well when the Security setting is set to controlled By Parent.

Its not well documented anywhere .

Implicit sharing is only for few standard objects and setting "Controlled By Parent" avoids creating childshare records and parentShare manages everything just treating like master detail for sharing purposes .

OWD metadata should tell the sharing type and metadata will also reveal the parentId field and the parent object for the given child object. SFDC grabs parentId for child record and looks for same in ParentShare Table to decide whether to show the records or not .

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.