[SalesForce] How to give a community user, write permissions on his Contact object

I have created a community user and I need him to be able to update the related contact details. I'm using RestAPI to get and update the contact.

In profile settings, I have given the profile Read, Edit permissions for Contact Object.

In sharing rules I have the following:

enter image description here

When I try the GET, it works as expected. But when I try ti update the contact, it gives me the error insufficient access rights on object id.

If I update the sharing settings from "Controlled by Parent" to "Public Read/Write", the update works. But allowing public access doesn't seem right.

How can I allow a community user edit his (and only his) contact?

Best Answer

So I have found the answer for this by myself.

I can set the OWD settings to Private and then create a Sharing set for the desired community user profile using the following. It can be used to map which users should be given which permissions based on which relationship.

https://help.salesforce.com/articleView?id=networks_setting_light_users.htm

Related Topic