How many Roles (Internal and External) can a single org have? I can't find this documented clearly without references to Territory count.
We know that Internal Roles and Account Roles are all stored in the UserRole table. Easy enough to query:
SELECT Id, Name, PortalType From UserRole
Internal Roles have a PortalType of 'None', Partner or Customer have their own respective PortalTypes. Simple.
What is the max we can store in this table?
Documentation for Account Role limits...
- Default for new orgs: up to 5k
- Open a Case w/ SFDC: up to 100k
- SFDC Approval Required: up to 500k
Documentation for Internal Roles...
- Default for new orgs: up to 500
Additional Documentation for Internal Roles... while this article is muddled up with legacy Territory Management, this is the only place I could find clear upper limits defined for Internal Roles:
- By default, a Salesforce org can have up to 500 Roles or Territories.
- The current Maximum is 10000.
- A documented business case, including the specific amount of roles or territories needed, is required when requesting a higher limit.
At this point I infer - based on the above - that AT MOST a single org could have at most 510k roles... 500k (external) + 10k (internal). But this is a theoretical upper limit, as Salesforce Approval would be required.
Am I thinking about this right? Is this better documented anywhere?