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
sdbsdb 

Site.createPortalUser: # of individual accounts a user in the role hierarchy can own?

When registering a portal user we are creating the contact, the Non-Profit Starter Pack automatically creates the individual account for the contact, then we set the individual account owner id to a user (always the same one) who is in the role hierarchy. Then we call Site.createPortalUser. This was all working fine, but a few days ago we started seeing the following error more and more often:

 

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

 

There could be over a 1000 portal users whose accounts are all owned by this same portal owner user. Could this be the cause of the problem? Is there a limit on how many individual accounts a portal owner user can own?

Daniel.ReidDaniel.Reid

Hello,

 

If I recall correctly, an account may have up to 10,000 portal users attached to it (that number may differ for Non-profit orgs).   Try attaching new users to a different account, the limit is only per portal owner account.  Adding a second (or third) may give you the extra capacity you need.

 

Daniel Reid
Contact us - We can help!

Salesforce Superheroes
------------------------------
help@salesforcesuperheroes.com
www.salesforcesuperheroes.com
1-888-407-9578 x102