I have a custom object whose sharing setting is private. I want to share a record of this object with a community user but not being able to do so. Normally we have a "Share Object" (OBJECTNAME__Share) but I am unable to insert a record in this object. I would not like to give the view all permission on that particular object to the community user.

Is there a way this can be achieved


  • Is your object detail and has a master detail relationship with other object? Mar 11, 2016 at 13:19

2 Answers 2


You will not be able to use Apex sharing with certain external user licenses (Customer Community users included).

For a more detailed explanation, please see Sharing access to partner community users based on record owner.


Object which are Detail part or Master-Detail relationship cannot be shared directly. Instead try to share the corresponding Master record. Or consider changing Object Model to have Lookup relationship instead of Master-Detail

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .