8

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.

  • What type of Communities user license is it, Customer or Partner? – greenstork Jul 22 '14 at 14:31
  • The license type is Customer Community Login. – D-Horse Jul 22 '14 at 14:45
11

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.

  • 1
    I believe Customer Community Plus users can participate in the full sharing model. – Jeremy Ross Feb 11 '17 at 16:50
  • 1
    Customer Communites Plus licenses do have access to the sharing model, and my answer should be revised as these licenses did not exist in 2014 when this answer was posted. – greenstork Feb 12 '17 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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