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
Kevin DyerKevin Dyer 

Apex case sharing for community users

Hello,

I'm hoping someone can help me with the following requirement?

Requirement: allow community users on different accounts to share cases with one another.

Use Case: a case is created by a company communities user (Account A) and they want to share it with an customer community user (Account B)
We don’t want customer community users to see cases created by company users unless given permission for that specific record.

Business context: we have internal employees that share cases with contractors and vice versa.

Current Setup:
  • Our organization wide default for cases is set to private
  • We’re using customer community and company community licenses
  • We have a community sharing setting for cases where access is determined by User:Account = Case:Contact.Account
I've read about apex sharing but I'm seeing conflicting documentation so I'm wondering if someone has achieved this before.

Best,

Kevin