Communities Sharing Rules with Partner level access

So Im a little confused about the best way to share content within a salesforce community.

We have a number of custom objects with content owned by community members, and our hope is to create “partner community” users within these accounts that can see all the content created by all the the regular community member users in their same account.

I see sharing groups for sharing content owned by community members with users salesforce users, and sharing sets for sharing content with other community members, but not sure how to easily share content with partner community users within their accounts and not with other regular community users.

The basic idea is that the partner community users will be able to report on all the activity by others in their accounts.

any ideas on how best to set something like this up?


Each Partner Community user associated with the same account gets a unique Role. When a Partner Community user registers from say, Acme Widgets, that user gets the role Acme Widgets User or something of the sort. Every other user who registers related to the Acme Widgets account also gets that role. Users related to other accounts get their own unique role based on that account name.

Partner Communities have access to the full sharing model, while Customer Communities can only access Sharing Sets and Sharing Groups.

Since each partner user has an account-specific role, it’s going to become really tedious to create sharing rules for each partner account. You certain could do what you’re asking this way, object by object, one rule for each account. That’s a lot of sharing rules. The other option, and it’s what I would recommend here, is to create rules using apex manual sharing and a trigger on your object(s) to automatically share it with other users having the same role as the record owner, one trigger for each object. Documentation on apex sharing here:

Sharing a Record Using Apex

Source : Link , Question Author : Keith Mancuso , Answer Author : greenstork

Leave a Comment