7

I'm creating this question to share the errors i've found trying to enable Customer Portal Users to edit their Account record, and to create new Contact records, and the solution i've found. I do it here because i haven't found a direct and simple answer to understand how to fix the issues.

Let's assume you created your portal users with a profile that have CRUD access to Account/Contact objects.

Also, let's assume you have your Sharing Settings on Account and Contact as Private for "External Access".

Finally, your site Workspace > Administration > Preferences does not allow users to see other members of the site (so they cannot see other Customers nor mention them on chatter).

Error: Portal account owner must have a role.

Solution: You should be sure that all Account Owner Users (your internal SF users) have an assigned Role.

Error: Insufficient Privileges - when trying to edit the user Account or any related Contact record.

Solution: You must go to Feature Settings > Digital Experiences > Settings, and then go down to "Sharing Sets" and create a new Sharing Set. Give it the name you want, add the Profile you are using for your Community Users (i have a custom one so i can set object CRUD settings), select the objects (Account and Contact), and then they will appear down in the "Configure Access" table.

Sharing set from Digital Experiences Settings

You will see a "Set up" link on Account, press it and set the fields as follows:

Account Access Mapping

The repeat the same on Contact:

Contact Access Mapping

Error: portal users cannot own partner accounts - when creating new Contact.

Solution: You must create 2 Record-Triggered flows as follows:

You must add a Formula on both flows, this is important:

enter image description here

The first:

First flow 1

First flow 2

On the decision i'm using "CspLitePortal" as my Portal Users are using the "Customer Community Login" license. You must double check this!

First flow 3

Then you clear the Account field so the Contact could be created having the Portal User as Owner (later we will fix this on the second flow):

First flow 4

Remember to activate the flow.

Now on the second flow on the answer as i don't have enough reputation points.

2 Answers 2

4

Second flow 1

Second flow 2

The same decision (remember to add the formula to the flow):

Second flow 3

And now you set again the AccountId and change the owner to be the same of the Account:

Second flow 4

Remember to activate the flow.

Now your Portal Users should be able to create new Contact records.

3
  • Awesome questions/answer; thanks man! Jun 23, 2022 at 22:42
  • One thing to note is that you can only have 1 sharing set per profile so you'll need to place all required objects into that single sharing set vs creating a sharing set for each object like you may be used to when dealing with classic/internal sharing settings. Aug 5, 2022 at 16:45
  • Thanks it worked for me as well! Great idea!
    – user132503
    May 5 at 3:06
0

This is good solutions and work for my situation. Thanks!

Note that if you don't want to share edit access on the Account, then the Account share setting can set to Read Only and you still can create/Edit Contact record

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .