+ Start a Discussion

Apex sharing is not executed by Customer Community users

Hello everyone,

I have apex based sharing rules setup as follows. When a user, creates a record in Object A, that record is shared with a public group based on a value in a look up field. 

If the record created looks up to master-record 1, it shares to public group 1
If the record created looks up to master-record 2, it shares to public group 2
and so on..

This works perfectly as long as the record is created by INTERNAL users.

Now I have a community setup with all my external users using the customer community login license type. When they create a record in the same object A, the above mentioned apex sharing code does not work. 

I have already checked the following:

  • They have the concerned apex classes enabled for their profiles
  • The apex classes are using ythe 'Without Sharing' keyword
Any help would be greatly appreciated!
SandhyaSandhya (Salesforce Developers) 

After some research, i found that Apex sharing is not available for Customer Community users." on the following page

and you should have Customer community plus license for this.

Please refer below posts for more information.

Hope this helps you!

Please mark it as Best Answer if my reply was helpful. It will make it available for other as the proper solution. 
Thanks and Regards