There is a custome object called CutomObject in my sandbox system. I have created a salesforce community to display these objects.
I have created a sharing set on this object type as follows and granted read/write
access.
CustomObject.Account = User.Contact.Account
This works fine so that, When I query all the CustomObjects it only extract relevant records. My lightning web component has a model containing following code to view entire CustomObject. (This model appears on abuttonClick)
<lightning-record-form
record-id="xxxxxxxxxxx"
object-api-name="CustomObject__c"
layout-type="Full"
mode="readonly"
columns=2>
</lightning-record-form>
But it is not execute properly. Following error appears.
You don't have access to this record. Ask your administrator for help or to request access.
INSUFFICIENT_ACCESS
Please note that this error only appears when I log in as a community user. When I log in as the system admin user this is working fine.
Any clue for this?
no access
against my CustomObject. Once the read access is granted, the issue was resolved.