Sub topic 9
Creating a user in Setup, step by step
This chapter assumes you know what a user licence, a profile and a permission set are, and that you have the Manage Users permission. It walks through creating one user in Setup. Later chapters cover permission set assignment, bulk creation and Apex.
Before you start
Check three things first. Each one is a common cause of a failed save.
- Licence capacity. The user licence the profile depends on must have at least one free seat.
- Profile. Pick the profile before you open the form, and confirm its licence has seats left.
- Username. It must be unique across all Salesforce orgs, not only yours, and it must look like an email address.
You can check capacity with this query in the Developer Console:
SELECT Name, TotalLicenses, UsedLicenses
FROM UserLicense
ORDER BY NameIf UsedLicenses equals TotalLicenses for the licence you need, creation will fail. Deactivate an unused user or buy more licences first.
The process
The diagram shows the order of the steps and where the main failures occur.
Steps in Setup
- In Setup, enter Users in Quick Find, then select Users.
- Click New User.
- Enter First Name, Last Name and Email. Last Name is required. First Name is optional but recommended.
- Check Alias. Salesforce suggests one, and you can edit it. It is limited to eight characters.
- Enter a Username. By convention it follows the form
[email protected]. It does not need to be a working mailbox, but it must be globally unique. - Select the User License, then the Profile. The licence list filters the profile list, so choose the licence first.
- Optionally set a Role. The role controls record visibility through the role hierarchy, not object permissions.
- Review Locale, Time Zone and Language. They default from your own settings, which may be wrong for the new user.
- Leave Generate new password and notify user immediately selected so the user receives a welcome email with a link to set a password.
- Click Save.
Fields that cause trouble
| Field | What to watch |
|---|---|
| Username | Must be unique across all orgs. Sandbox usernames carry a suffix, such as `.demo`, when copied. |
| Wrong addresses mean the welcome email goes to the wrong person. | |
| User License | Cannot be changed freely after creation, so choose carefully. |
| Profile | Must belong to the selected licence. |
| Time Zone | Affects date and time display and scheduled work for the user. |
After saving
Open the new user record and check that the Active box is selected and that the profile is correct. A user with the right profile but no permission sets only has baseline access. The next chapter covers assigning permission sets and permission set licences.
If the welcome email does not arrive, open the user record and click Reset Password. Check spam filters too.
Exercise
You select the Standard User profile, but Save fails with "Your organization has exceeded its licence limit" for the Salesforce licence. Which query do you run to confirm the cause, and what two actions fix it?
Show answer
Query UserLicense (SELECT Name, TotalLicenses, UsedLicenses FROM UserLicense) and confirm UsedLicenses equals TotalLicenses for the Salesforce licence. Fix it by deactivating an unused user to release a seat, or by buying more licences.
Exercise
Why should you choose the User License before the Profile on the New User form?
Show answer
The licence selection filters the profile list to profiles that belong to that licence. Choosing the licence first stops you picking a profile that is incompatible with it.