Sub topic 1
What a Salesforce user is
A Salesforce user is a record on the User object that represents one person (or one integration) who can log in to an org. An org is a single Salesforce environment with its own data, configuration and users. This chapter builds the working model that the rest of the tutorial relies on.
Prerequisites
This chapter assumes you have:
- Basic familiarity with the Lightning user interface and the Setup menu.
- Administrator access, or the Manage Users permission, in an org or sandbox.
- An idea of what objects and records are in Salesforce.
The optional SOQL query near the end needs basic SOQL syntax. No Apex is used here.
The user is a record
Every login maps to one row on the User object. Because it is a record, you can query it, report on it and load it with tools such as Data Loader, like any other record.
The user record holds three kinds of information:
- Identity: name, username, email address and alias.
- Regional settings: time zone, locale and language.
- Access settings: the licence, profile and optional role that decide what the user can do.
Setup shows the identity and regional fields on the user's detail page. The access settings come from linked records, which the next chapters cover in turn.
How access fits together
Four pieces determine what a user can do. Each answers a different question.
| Piece | Question it answers | Typical count per user |
|---|---|---|
| User licence | Which family of features can this user have at all? | Exactly one |
| Profile | What is the baseline set of permissions? | Exactly one |
| Permission sets | What extra permissions does this user need? | Zero or more |
| Role | Which records can this user see through the hierarchy? | Zero or one |
The licence sets the upper limit. A profile must be compatible with the licence of the user it is assigned to. Permission sets add access on top of the profile and never remove it.
The profile is tied to the licence, so a user gets a licence by being given a profile that belongs to it. This is why you pick a profile, not a licence, when you create a user.
Why the model matters
Licences are a paid, limited resource. Each active user consumes one licence of their type. If you create users without checking capacity, creation fails or you spend licences you did not plan to use.
Access is also easier to maintain when each piece has one job:
- Use the profile for what everyone in a job family needs.
- Use permission sets for exceptions.
- Use the role for record visibility.
Keeping these separate avoids a long list of near-identical profiles.
Users cannot be deleted
Salesforce does not let you delete a user. Records the user owned or created refer to them, and removing the user would break that history. You deactivate the user instead, which blocks login and frees the licence. A later chapter covers this.
A first look at your org
You can list the users in an org with a SOQL query, for example in the Developer Console Query Editor.
SELECT Name, Username, Profile.Name, IsActive
FROM User
ORDER BY NameThe query follows the profile relationship to show the profile name next to each user. Check IsActive to see which users currently use a licence.
Common misunderstandings
- A user is not the same as a contact. A contact is a business record about a person outside your org. A user is someone who logs in.
- A permission set does not replace a profile. Every user still needs a profile.
- Deactivating a user does not remove their records or their ownership of them.
Exercise
A new colleague needs everything the Standard User profile gives, plus access to one extra custom object. Which two pieces do you use, and why can you not delete the user later when they leave?
Show answer
Assign the Standard User profile for the baseline and a permission set for the extra object access. You cannot delete users because other records reference them, so you deactivate the user instead, which also frees the licence.