Consider the following scenario:
- Salesforce has multiple accounts for Contacts set up
- Contact A has access to Account 1 and 2 (1 is the primary account)
- Contact B has access to Account 2 and 1 (2 is the primary account)
- Contact C has access to Account 3 and 2 (3 is the primary account)
- All are community users, I am logged in to the User linked to Contact A
I want Contact A to be able to see Contact C as both have Account 2 in their related accounts, but neither have Account 2 as the primary account.
I have set up Sharing Sets according to this.
My sharing set rule is:
User:Contact.RelatedAccount = Contact.Account
This allows me to see Contact B perfectly because Contact B's Primary Account matches one of my related accounts. However, I cannot find a way to set the sharing rule as such:
User:Contact.RelatedAccount = Contact.RelatedAccount
i.e. a many:many relation instead of a many:one relation
This doesn't help because it's account:account relations and not account:contact, unless I'm misunderstanding the tool.
How do I solve my problem?