Sub topic 3
Object Permissions Come First: Profiles and Permission Sets
This chapter assumes you can navigate Setup, know the standard objects (Account, Contact, Opportunity, Case), and understand that every user has one profile and may have permission sets. You should also be able to read a basic SOQL query.
Two questions, asked in order
Salesforce answers two separate questions when a user touches a record.
- Can this user work with this type of record at all? This is object-level access. Profiles and permission sets answer it.
- Can this user work with this particular record? This is record-level access. Org-wide defaults, ownership, the role hierarchy and sharing answer it.
The order matters. Object permissions are checked first and act as a ceiling. If a user has no Read permission on Account, no sharing setting can show them an account. If a user has Read on Account, sharing then decides which accounts they see.
The object permissions
Each object has up to seven permissions. Five are the standard ones, and two are administrative overrides.
| Permission | What it allows |
|---|---|
| Read | View records the user can access through sharing |
| Create | Create new records |
| Edit | Update records the user can access through sharing |
| Delete | Delete records the user can access through sharing |
| View All | View every record of the object, ignoring sharing |
| Modify All | Read, edit, delete, transfer and approve every record, ignoring sharing |
Read, Edit and Delete are limited by sharing. A user with Edit on Opportunity can edit only the opportunities that sharing lets them edit. Create is different, because a new record has no sharing history. The user becomes its owner and gets full access to it.
Permissions build on each other. Edit requires Read, and Delete requires Read and Edit. Salesforce enforces this when you save the settings. View All and Modify All are covered in a later chapter. For now, treat them as the exception that bypasses record-level sharing.
Separately from object permissions, field-level security controls which fields a user can see or change. A user with Read on Account but no access to the Annual Revenue field sees the record without that field. The field settings live in the same profile or permission set.
Profiles
A profile is a required, single assignment. Every user has exactly one profile, and it sets the baseline of what that user can do. A profile contains object permissions, field-level security, app and tab visibility, system permissions such as "Export Reports", login hours and IP ranges, and record type and page layout assignments.
A profile can grant permissions, and in the older model it can only grant. It cannot subtract permissions that another source has granted. This is why a profile is a poor place to hold fine-grained, exception-based access.
A profile is not a role. The profile says what kind of work a user can do with objects. The role, covered later, says where the user sits for record visibility. Two users can share a profile and have different roles, or share a role and have different profiles.
Permission sets
A permission set is an additive bundle of permissions. A user can have many, and each one adds access on top of the profile. A permission set cannot remove access. Salesforce computes a user's effective object permission as the union of the profile and all assigned permission sets.
A permission set group bundles several permission sets into one assignable unit. A group can also include a muting permission set. Muting turns off specific permissions within the group only. It does not change the underlying permission sets, and it does not affect permissions the user receives from the profile or from permission sets outside the group.
The following table summarizes how the two mechanisms differ.
| Aspect | Profile | Permission set |
|---|---|---|
| Assignments per user | Exactly one | Zero or many |
| Can remove access | No | Only through muting in a permission set group |
| Typical use | Baseline for a job type | Extra access for a subset of users |
| Contains login hours and IP ranges | Yes | No |
Current Salesforce guidance favors a minimal profile plus permission sets and groups for everything else. Treat this as a design preference, not a platform rule. Profile-based setups still work and are common in older orgs.
A worked example
Suppose a support team needs to read accounts, and a few senior agents also need to edit them. A reasonable design is as follows.
- Give all support users a profile with Read on Account.
- Create a permission set called "Account Editor" that grants Edit on Account.
- Assign that permission set to the senior agents.
Now consider an account owned by a sales user in another branch of the role hierarchy, in an org where the Account org-wide default is Private. A senior agent has object-level Edit. Even so, they cannot open that account, because record-level access is missing. Object permissions are necessary, and they are not sufficient.
The reverse also fails. A user with a role high in the hierarchy and a Private default would normally see records below them. If their profile lacks Read on Account, they see nothing, because the first check fails.
Checking effective permissions
You can check what a user has in Setup. Open the user record, then review the profile and the Permission Set Assignments related list. Each permission set page also has an "Object Settings" section that shows its object grants. The "View Summary" option in the user's permission set assignment area helps when a user's access comes from several sources.
You can also query permissions with SOQL. The ObjectPermissions object holds one row per object per profile or permission set. Every profile has an underlying permission set, so one query covers both.
SELECT Parent.Name, Parent.Profile.Name, SobjectType,
PermissionsRead, PermissionsEdit, PermissionsDelete,
PermissionsViewAllRecords, PermissionsModifyAllRecords
FROM ObjectPermissions
WHERE SobjectType = 'Account'
AND Parent.Profile.Name = 'Standard User'To find which permission sets a given user holds, query PermissionSetAssignment.
SELECT PermissionSet.Name, PermissionSet.IsOwnedByProfile
FROM PermissionSetAssignment
WHERE AssigneeId = '005XXXXXXXXXXXXXXX'Rows where IsOwnedByProfile is true represent the user's profile. The other rows are real permission sets.
Common errors
- Diagnosing a sharing problem that is a permission problem. If a user gets "insufficient privileges" or cannot see the object tab, check object permissions first. Changing org-wide defaults will not help.
- Granting Modify All to fix a visibility complaint. This bypasses sharing for every record of the object. It solves the symptom by removing the control. Use it only for administrative roles that genuinely need it.
- Expecting a permission set to restrict a user. A permission set only adds. To tighten access, change the profile or the permission set that grants it, or use muting in a group.
- Assuming Read on the object shows all records. Read means the user may read records they can reach. Which records they reach is decided by the sharing model in the following chapters.
- Forgetting field-level security. A user may have full object access and still see a blank or missing field. Check the field settings in the profile and permission sets.
How this connects to the rest of the model
Object permissions set the maximum a user can do with a type of record. Org-wide defaults, covered next, set the minimum record visibility for that type. The role hierarchy and sharing mechanisms then widen record access. The final access for a user is the intersection of object permission and record access, apart from the View All and Modify All exceptions.
Exercise
A user has a profile with Read, Create, Edit and Delete on Opportunity. The Opportunity org-wide default is Private. The user is not the owner of an opportunity, sits in a separate branch of the role hierarchy, and has no sharing rules or manual shares that apply. Can the user open that opportunity? Then say what changes if you add a permission set that grants Edit on Opportunity.
Show answer
No, the user cannot open it. Object permissions pass the first check, but the Private default and the lack of ownership, hierarchy access or sharing mean the record-level check fails. Adding a permission set with Edit changes nothing, because the user already had Edit and the permission set only adds object-level access. The missing piece is record-level access, which needs a sharing rule, team membership, manual share or a position higher in the hierarchy.
Exercise
A user's profile grants Edit on Case. You assign a permission set that does not mention Case. Does the user lose Edit on Case? Which tool would you use to remove Edit for a subset of users, while keeping it on the profile for everyone else?
Show answer
No. Permission sets only add access, and the effective permission is the union of the profile and all permission sets, so a permission set that does not mention Case has no effect on it. A permission set cannot remove Edit for a subset of users who get it from the profile. You would change the profile design, for example by moving Edit into a permission set assigned only to the users who need it. Muting in a permission set group can turn off permissions that come from permission sets within that group, but it cannot mute what the profile grants.