Sub topic 4
Profiles and their link to licences
This chapter assumes you know what a user record and a user licence are, and that you can open Setup and read a SOQL result. You should also know that a licence limits which features a user can have.
What a profile does
A profile is a named set of baseline permissions and settings that every user must have. Each user has exactly one profile. The profile controls object permissions, field permissions, tab visibility, app access, page layout assignments, login hours and login IP ranges.
A profile is tied to one user licence. When you create a profile, you pick the licence, and it cannot be changed later. Only a user whose licence matches the profile can be assigned that profile.
How the link works
The licence sets the ceiling. The profile chooses what a user gets under that ceiling. A permission that the licence does not include cannot be turned on in the profile.
Salesforce enforces this at two points:
- When you edit a profile, permissions the licence does not support are not offered.
- When you save a user, the profile's licence must have an unused seat. If none are left, the save fails.
The user does not hold a licence directly. You choose a profile, and the user's licence follows from it. Because of this, the profile list on the New User page shows only profiles for the licence type you selected.
Standard and custom profiles
Salesforce ships standard profiles such as Standard User, System Administrator and Read Only. You can change only a few settings on most standard profiles. For anything else, clone one and edit the clone.
| Profile type | Editable | Typical use |
|---|---|---|
| Standard | Limited | Starting point to clone |
| Custom | Fully | Your org's real job functions |
When you clone, the new profile keeps the same licence as the source. To get a profile on a different licence, clone a profile that already uses that licence.
Finding which licence a profile uses
You can see the link by querying the Profile object. The UserLicense.Name field is reachable through the relationship.
SELECT Name, UserLicense.Name
FROM Profile
ORDER BY UserLicense.Name, NameUse this before creating a user. If you want a user on the Salesforce licence, only the profiles in that group are valid choices.
Common mistakes
- Choosing a profile before checking capacity. The profile's licence may be full. Check the counts first, as shown in the previous chapter.
- Expecting to change a profile's licence. It cannot be changed. Create a new profile on the right licence and move users to it.
- Putting everything in the profile. Profiles are one per user. Extra access is better added with permission sets, covered in the next chapter.
- Editing a standard profile that many users share. Clone it first so your change is limited to the users you choose.
Exercise
A new user must be on the Salesforce licence, but the Profile picker on the New User page does not show the custom profile you built last week. What is the most likely cause, and how do you fix it?
Show answer
The custom profile was created on a different user licence, and the profile picker lists only profiles that match the selected licence. A profile's licence cannot be changed, so clone a profile that uses the Salesforce licence, apply the settings you need, and assign that new profile. You can confirm the cause with SELECT Name, UserLicense.Name FROM Profile.