In my organization, users in Communities are currently associated with a single account. When users are created, they are given a unique user name and contact. This has worked well in that the Communities Sharing Set has bound between user contact and the standard contact object. The person who owns their cases sees only their cases.
Today, I've been asked to find a solution to share records in communities with users who have the same account, while maintaining the security for the rest of the organization. Effectively, it is something like this:
Alice, Special Account = Special User
Bob, Normal Account = Normal User
Joe, Special Account = Special User
Alice can see Alice and Joe's cases, but not Bob's. Bob can see only Bob's cases.
Normally, I believe I'd accomplish this with partner licenses. But since I don't have those, I am thinking of doing something like (in psuedocode):
New Field: CommunityPartner –Boolean
Workflow:
If (Account in [list of accounts])
{
CommunityParnter = true;
}
Trigger:
Foreach (case owned by AccountWithCommunityPartnerTrue)
{
//Share case with all other users from this account that have the right profile
}
Does this sound like a viable solution? Is there another way to accomplish this?