I am trying to programmatically share a custom object (
Widget__c) with a
Public Group using apex managed sharing. For every
Widget record that gets created, it is associated with a custom object
Widget__c is a one to many relationship...i.e. one group to many widgets.
Widget_Group__c just stores the group name and a few other fields. There is actually public group with the same name that I will use for the share. When the
Widget record is created, I am looking to fire a trigger that shares that widget record with the public group that has the same name as the
Now, there can be lots (thousands) of
Widget records and there can potentially be and will very likely be over 50 widget_group__c group records.
It looks like I can create the trigger to share the widget record with the public group. However, I'm concerned about the sharing limit.
If I have hundreds or even thousands of
Widget records that will need to be shared with hundreds or thousands of groups, is this approach going to ultimately fail?
It is basically a criteria based sharing rule created programmatically.