For those familiar with the subject, how would you go about circumventing the limit of 50 criteria-based Sharing rules?

  • Is there an Apex-based solution for critera-based Sharing?
  • Is there some OTHER solution I'm not considering?

Using "Owner" is not feasible. We are controlling access to (currently) FIVE company divisions, and JUST Sharing for that is SIX Sharing Rules per Object. I'm quite certain we will run out of Rules before we are done with our implementation.

I should have known about this limit; when I took over the Org setup, this was one of the things that "survived" from the previous beginnings of implementation, and I stuck with it, not having vetted out the fact that we could have 10, 20, 50 objects needing Sharing Rules based on Criteria (that includes accounting for "controlled by Parent" entries that won't count, thankfully).

For reference: SF Idea for increases limit on criteria-based sharing

SF Help: Criteria-Based Sharing Rules

UPDATE: Fixed title as the limit is PER OBJECT.

  • Apex based sharing is best. I have used visual workflow to create the share records for some small projects but would hesitate to use that in any large volume settings.
    – gorav
    Feb 26, 2017 at 18:48

1 Answer 1


I see there is Help at SF for Apex-based Sharing, using ObjectName__Share objects. But I see no mention of limits. I also feel this is much more cumbersome and technical than an "SF Admin" would normally do (by the SF definition of an SF Admin).

Sharing a Record Using Apex

Without knowing the LIMITS using these methods shown, I am unclear if this would at least circumvent the 50 limit imposed on the GUI-based Sharing Rules.

UPDATE: There seems to be no theoretical limit to Apex-based direct sharing via the __Share records.

  • 1
    Yes, you can share as many records as you want manually. We've done this successfully to implement a type of "criteria-based" sharing for 120 retail locations across several objects, which wouldn't have been possible with a standard rule. It works just fine as long as you pay attention to what you're doing.
    – sfdcfox
    Feb 24, 2017 at 19:17
  • Thanks for the reassurance. Continuing to investigate, but this seems like the logicak answer...
    – AMM
    Feb 24, 2017 at 19:38
  • It appears I did not read thoroughly. I did not notice on two separate pages the "per Object" reference to the sharing limitation. 50 PER OBJEcT should not be a problem any time soon. I'm thankful for this. In any case, everything I read says when this IS an issue, Apex-control of the __Share records is the way to go. Marking this appropriately. Thanks again, @sfdcfox
    – AMM
    Feb 24, 2017 at 19:57

You must log in to answer this question.

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