1

I'm having a problem creating contacts as a Community User. I can create a contact without a link to an account just fine, but when I try to link an account to it, I get the error 'portal users cannot own partner accounts'.

I don't get this at all. I'm not editing the account in any way, much less trying to own it. It makes no sense not to be able to link contacts to an account if I can see the account record.

I'm having this issue in both the Napili and Sales community templates, tested in my own sandbox org and also in a dev org only used for Trailhead challenges involving Community builder.

To recreate:

  1. Set up a new Community with either Napili or Sales template
  2. Open Community Builder
  3. Add a Contact Object page to the navigation menu
  4. Log in as a Community User
  5. Try to create a contact linked to the same account as the community user

What is stopping me from letting my customers create contacts for their account?

0

Looks like the Owner of the contact is defaulted to the Community User doing the creating, which is not allowed. But since I can create a contact without an account, this is only a problem when I add an account to the contact I'm creating?

In any case, I managed to get around it by changing the OwnerId to the owner of the linked Account in a before insert trigger.

| improve this answer | |
0

Does the user have create and edit access on accounts & contacts?

I would try using a create contact custom action with the Account filled in with a merge field for the current User's account. This will save the user the trouble of having to fill in the field, and you can guarantee it is the right account on the Contact.

From there, I would try to use the predefined values on the custom action to set the Owner field as well. Since you are associating the new Contact with an existing Account, you will just need to add the current User's Contact Owner or the current User's Account Owner, (or whatever value you do so choose) as the New Contact Record's Owner.

Let me know if that works for you.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.