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
MohaMoha 

portal account owner must have a role

Hello, i'm trying to create a new user from PortalSite, but it's giving me this error: 

There was an error in registering a user in site Login. The error message is: portal account owner must have a role

when i register and i check AccountList and ContactList, i find that both of records are created and the Contact is associated to this account but i can't login because the owner of that record don't have a rôle, and i wanted to change the rôle of the owner but i couldn't find out How, 

i'm enabling self register in customer portal

setting a default profile which is : highVolumecustomer portal

i checked SiteProfil i called it : Login

and i wanted to set a default role for the Site Profile and for the HighVolumeportal and it seems that it's not allowed for those both, 

Best Answer chosen by Admin (Salesforce Developers) 
Save Time with ForceSave Time with Force

Jamal,

Try to use a system administrator user id for the owner and make sure that the user has a role on it. When you use the site.createportaluser , make sure you use an owner id who should be a system adminstrator profile and have it enabled on it. If you need further information, http://betterapexprogramming.com/?p=54 check my blog.. Ensure that the profile is enabled on the guest user profile page as well and also on the customer portal settings. If you like my answer, please click like or mark it complete..