function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Chandra Kant BaghelChandra Kant Baghel 

How to provide contact record access to community user?

Hi All

We are trying to update a contact record (which is user contact record) from the sf community using a flow.
And it is the same User which is accessing the community
But the flow seems to break with an error:
The flow tried to update these records: null. This error occurred: INSUFFICIENT_ACCESS_OR_READONLY: insufficient access rights on object id. 
and it seems to be error related to OWD being "Controlled by Parent" for contact and "Private" for Account.
So we tried for Apex Sharing but even the apex sharing is not able to share the contact records.
Apex Sharing insertion list for contactShare recrod is throwing following error in debug:
insufficient access rights on cross-reference id;getStatusCode=INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY;])

So now at this point we are not sure if this is even feasible or not.

Any Approach line or Solution is welcome

Thanks
VinayVinay (Salesforce Developers) 
You might need to enable 'Allow users to see contacts that have not been enabled for partner or customer accounts' to provide contact access to site user.

Reference:
https://help.salesforce.com/s/articleView?id=000316672&type=1

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Chandra Kant BaghelChandra Kant Baghel
Hi Vinay

Thanks for the Response.

I think there is little confusion let me rephrase it again.
The community user is not trying to update some other contact, but it is trying to update the very own contact which is associated with comunity user.
Basically whenever a community user is created, a contact is also created along with it that contains some information about the user.

So we are trying to update that very contact from that user which is associated with it.
SoI think that should be accessible by default.

But we are getting error of accessibility.

Thoughts?