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
Re07Re07 

Portal users cannot own partner accounts with Customer community plus License. How to avoid this error.

We have 2 profile for eg. ABC and XYZ which are of Customer community plus License. I want to create a contact from a custom object[It has a lookup to contact] from profile ABC using standard oob functionality in the community template - Customer Account Portal Template.

I am getting this error. Is there any way to avoid it.

Any help would be much appreciated
Raj VakatiRaj Vakati
This error message is confusing. Basically, the system will prevent portal users from owning contacts that are linked to any kind of account, according to this knowledge article:


https://help.salesforce.com/articleView?id=000004491&language=en_US&type=1

When you try to enable an Account as a Partner Account and any of the contacts associated to that account are owned by a Partner User, you would receive this error message. If Partner Account enabling was allowed to go through successfully in such a scenario, it could result in Partner Users owning Partner Contacts which is not allowed by design.
The only way to enable the Account as a Partner Account, when this situation is encountered, is to update the ownership of the associated Contacts so that they are owned by internal, non-Partner Users.




The only way for you to avoid the error is to use a beforeInsert trigger to change the contact ownership to an internal Salesforce license user.

 
Re07Re07
Hi Raj,

I am trying to update the contact Owner ID from process builder as shown below still it's not working. Could you please suggest what I am missing - 

User-added image
Raj VakatiRaj Vakati
Your are doing an Wring mapping on the process buidler field update 

You need to do it like below  .. User record id is starts with 005 .. 

use the below SOQl to get the user id 

Select Id,Name from User 

User-added image

 
Re07Re07
Hi Raj,

String mapping its working fine and updating the owner of contact also...however, in UI I started getting the error while saving contact when this process builder is active - 
We couldn't find the record you're trying to access. It may have been deleted by another user, or there may have been a system error. Ask your administrator for help.

In the backend, I can see contact is created and the owner is updated and account also assigned.
Thanks!
Raj VakatiRaj Vakati
can u check the debug logs ????
Re07Re07
Below is the debug logs of PB - 
09:05:13.232 (301277347)|WF_FLOW_ACTION_DETAIL|09L0n00000099Tj|[Contact: sdfc test 0030n00000dssjB]|Id=09L0n00000099Tj|CurrentRule:Update_Contact_Owner3010n0000007Np1 (Id=01Q0n000000E3Ua)
09:05:13.232 (301634075)|WF_FLOW_ACTION_DETAIL|Param Name: myVariable_current, Param Value: ENCODED:{![treatNullAsNull]{!ID:this}}, Evaluated Param Value: {Entity type: Contact, id: 0030n00000dssjBAAQ}|Param Name: myVariable_old, Param Value: {!old}, Evaluated Param Value: null