3

I am trying to understand if Implicit sharing capability can be used to avoid record locks or increasing performance of update operations on master-detail records.

I am referring to this link here. I am particularly trying to understand how the highlighted description here( which says Not used when sharing and the details of the 'Child' type of sharing) would help avoid record locks on updates of an Account with a huge amount of Contact records.

enter image description here

5

Controlled by Parent isn't the same as Implicit Sharing. Implicit Sharing is when a user gains access to a child record and also gains read-only access to the parent (e.g. a contact is assigned to a user, and thus gains read-only access to the account). Implicit sharing only has an effect when the parent object is Private and the child is not Controlled by Parent. Controlled by Parent, in contrast, grants read or read-write access to the child records when access is granted to the parent. It has an effect in all parent share modes (private, read-only, and write).

Using Controlled by Parent will decrease row lock time on the parent, but not eliminate it. There has to be a lock on the parent while the children are being updated. Controlled by Parent will increase performance because there's no child share table while in this mode (the children's access is checked using the parent's share table).

You can use this if you want to, but there are typically better ways to reduce row lock contention, such as making sure there's only a few hundred children per parent instead of lumping millions of records under a single parent, which is detrimental to performance anyways.

  • Thanks for the explanation.Seems like using Master-detail relationships should be better off than lookups as 'Controlled by Parent' can save us from lock errors. How do highly nested territory hierarchies updates influence the record locks? There is no documentation available on the territory hierarchies causing locks, would appreciate if you could provide me with some direction on territory hierarchy updates in the context of record locks, please. – Shalini SF May 3 '17 at 12:55
  • @ShaliniMendu Territory adjustments are run asynchronously, I believe, so they can also cause extended locks. You're right, though, it's not terribly well documented that I know of, and I don't have enough experience with them to be able to answer that definitively. It might be worth writing a new question regarding that. – sfdcfox May 3 '17 at 13:33
  • Sfdcfox, I have just asked a new question :), thanks for your patience. – Shalini SF May 3 '17 at 13:46
0

Implicit sharing is a system built feature and cannot be implemented by any other means (Manually or by automation). Most of these sharing permissions are applied across Account and it's related entities.

For your highlighted scenario, it is applied on parent and child account records and is not applicable to any other objects.

  • right! I do understand that it is a system capability but how does this knowledge help a developer, architect better design with respect to record locks and performance was my question. – Shalini SF May 3 '17 at 6:24

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.