function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ryan Werner 22Ryan Werner 22 

Salesforce community and sharing - why are community accounts shared with all internal users of the same role?

We have a Salesforce community implementation and at the same time do not have a concept of role hierarchy in our org. Right now all internal users have the same role, "Sales User". Up until now, allowing all accounts to be viewed by all internal users was part of the requirements. Now, we want certain accounts hidden while having all other accounts remain open.

Our OWD for Account is set to "Private".

We created a sharing rule to open access of all Accounts with IsPrivate__c = false to the "Sales User" role.

What we are finding is every internal user is still allowed to view private accounts because of the sharing reason "Associated Portal User or Role" and sharing relationship of "Manager of Role Member". This is because the owners of the community Account are "Sales User" roles and therefore it is horizontally opening all sharing with all Sales Users. All community users assigned to that Account have the "AccountNameHere Customer User" role which reports to the "Sales User" role (because the Account owner is a Sales User).
How can we disable this horizontal role sharing? If I change an Account owner to a role above "Sales User", then the horizontal sharing with "Sales User" is removed (and instead shared with any of the new role or higher). We could introduce more roles, however this wouldn't accomplish anything because whatever role the owner is still we be shared with other users in that role and above.
Any ideas? Are there any settings under Sharing Settings or anything in the community settings that need to be tweaked?

Thanks
pmmhmspmmhms
Any chance you found a good solution? We've run into a similar problem.
ikle rthhytikle rthhyt
Is this good idea to integrate this script in simple blog? I want to apply for my website (https://www.powertoolsreport.com/best-zero-turn-mower-under-3000/).