I am trying to keep records separate from certain users when it is categorized in a specific group. For instance, when an account is created if it's in category A I want only group A to have access to the record. Also if it does not have a category, everyone should have access to the account. Right now I have the org-wide default set to private and a sharing rule on account reading off of a picklist. The problem I am running into is the related records. If an account is category A, anyone not in Group A, should not be able to see the related records.

I have considered making a process builder update a field on all the related records and have sharing rules on all the objects. But there has to be a more efficient way. Once the parent account is shared with a group or all users the related records should be shared as well. I have thought about making a custom role hierarchy but I don't think that solves the related custom object records.

  • 1
    Only master-detail relationships inherit sharing. Lookup relationships do not. – gNerb Nov 7 '19 at 15:39
  • Correct, but it wouldn't make sense to add a master-detail to every custom object. I think that would make it harder for users to create records then the process builder. There has to be a workaround for this. – CField Nov 7 '19 at 15:45
  • There is a workaround, it's the one you mentioned in your question or similar approaches. Lookup relationships are limited and I don't expect that will ever change. That's why tools Like DLRS exist. – gNerb Nov 7 '19 at 15:56

I assume you can create a formula field on child objects (related list) to identify the category of parent record and sharing rule similar to the one you've created before.

  • 1
    Unfortunately, sharing rules cannot read off of a formula field. – CField Nov 7 '19 at 16:38
  • Or a custom field and get it auto-populated using a process builder or trigger. – Nishanth Nov 7 '19 at 16:41
  • Yes, in my post I referenced that option, but I'm looking for a workaround to prevent, spending the time to creating those fields and the process. The larger issue is after the process runs if someone creates a new related record how does that field update if the account isn't updated? – CField Nov 7 '19 at 17:03

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.