Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I've a object called myobject__c. This object is private in OWD Setting.

Now when admin create a new record of this object then I want to share this record with a user(community user). For this I've written a code in trigger to create a sharing record of this object (myobject__Share).

But I am getting a problem of :- FIELD_INTEGRITY_EXCEPTION: field integrity exception: unknown (invalid user or group: 005XXXXXXXXXXXXX).

how can I solve this problem and second doubt is can we create share record for community user or not.

share|improve this question
    
What type of Communities user license is it, Customer or Partner? –  greenstork Jul 22 at 14:31
    
The license type is Customer Community Login. –  D-Horse Jul 22 at 14:45

1 Answer 1

Customer Communities users do not have access to the full sharing model and therefore can't be added on a __Share record. The only way to share a record with a Customer Communities user is through Sharing Sets and Sharing Groups.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.