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.