Sub topic 5
Setting field access in Setup
This chapter assumes you know what a profile, a permission set, and an object permission are, and that you can navigate Setup and the Object Manager. It covers how to set field-level security (FLS) in Setup, which entry points exist, and the mistakes people make most often.
The two permissions a field can grant
FLS gives each field two flags per profile or permission set:
- Read: the user can see the field's value.
- Edit: the user can change the field's value. Edit requires Read, so Salesforce turns Read on when you tick Edit and turns Edit off when you clear Read.
There is no separate "create" or "delete" flag for fields. Creating a record with a value in a field needs Edit on that field, in addition to Create on the object.
Some fields cannot be configured. System fields such as CreatedDate are always read-only. Required fields, and fields such as the Name field on most objects, have FLS that is fixed or only partly adjustable. The chapter on required fields covers that interaction.
Three places to set FLS
You can reach the same underlying data from three directions. Each is suited to a different question.
| Entry point | Path in Setup | Best for | Scope of one edit |
|---|---|---|---|
| Field's own page | Object Manager, pick the object, Fields & Relationships, pick the field, Set Field-Level Security | Answering "who can see this field?" | One field, many profiles |
| Permission set | Permission Sets, pick the set, Object Settings, pick the object, Edit | Answering "what can this set do?" | One permission set, many fields on one object |
| Profile | Profiles, pick the profile, Object Settings, pick the object, Edit | Legacy setups, baseline access | One profile, many fields on one object |
The field's own page shows a grid of profiles, with Visible and Read-Only checkboxes. Note the labels: Visible means Read, and Read-Only means Edit is off. Ticking Visible alone does not grant Edit unless Read-Only is cleared. The grid lists profiles. To see permission sets on that page, use the View Field Accessibility option described below, or manage permission-set access from the permission set itself.
When you create a new custom field, the wizard asks "Establish field-level security" as one of its steps. By default every profile gets the field visible. Treat that default with suspicion for sensitive data, and change it before you finish the wizard.
Worked example: hiding an internal notes field
Suppose Account.Internal_Notes__c should be visible to the Sales Operations team only.
- Create the field. In the "Establish field-level security" step, clear Visible for every profile. Leave it on only for System Administrator, or clear all and rely on a permission set.
- Create a permission set named
Account Notes Access. - Open the permission set, then Object Settings, then Account, then Edit.
- Under Field Permissions, tick Read Access and Edit Access for
Internal Notes. - Save, then assign the permission set to the Sales Operations users.
Note that step 4 only works if the users also have Read on the Account object. FLS does not grant object access. If the profile lacks Read on Account, ticking field access changes nothing for that user.
Permissions are additive
A user's effective field access is the union of their profile and every assigned permission set. If the profile grants Read and a permission set grants Edit, the user gets Edit. If one source grants nothing, that does not subtract anything.
This has two consequences:
- You cannot remove access with a permission set. Permission sets only add. To take access away, remove it from the profile or from the permission set that grants it, or unassign that permission set.
- When a user can see a field you thought was hidden, look at every source. The cause is usually a second permission set, or a profile you forgot about.
Salesforce does offer muting permission sets inside permission set groups, which can remove permissions for the group. That feature belongs to the chapter on permission set groups.
Checking what a user can actually do
Two tools answer "why can or can't this user see the field?":
- View Field Accessibility. In Setup, search for Field Accessibility. Pick an object, choose "View by fields" or "View by profiles", and the grid shows the resulting access. This view is based on profiles and does not give you the full picture for permission sets.
- User access summary. Open the user record and use the Permission Set Assignments related list, then open each assigned set to inspect its field permissions. For a more direct check, open the user's Field Accessibility view where available, or log in as the user (if Login Access is allowed) and open the record.
The most reliable test is behavioral. Log in as the user, or use a test in Apex, and confirm what appears.
Edge cases and common errors
- Field shows in the layout but is blank for the user. The layout includes the field, but the user has no Read. A page layout only arranges fields. Layouts and FLS are separate controls.
- Field is Read-only in the UI but editable through the API. This usually points to a validation or a layout setting (read-only on layout), not FLS. The layout can make a field read-only on that page, while FLS decides what the API allows. Check both.
- Ticking Edit does nothing. The user's profile may lack Edit on the object, or the record may be locked by sharing. FLS is one layer of several.
- Wide default exposure. New custom fields default to visible for all profiles in the wizard. Audit fields created by others.
- Changing profile versus permission set. Editing a profile affects every user with that profile immediately. A permission set affects only its assignees. Prefer permission sets for exceptions.
- Deployments overwrite settings. If you deploy a profile's metadata from a sandbox, you can overwrite its field permissions in production. The metadata chapter covers safer deployment.
What to verify after any change
- Open the field's FLS page and confirm only the intended profiles are Visible.
- Check each permission set that includes the field.
- Test as a representative user.
- Note which reports and list views include the field, since they will change for users who lose access.
Exercise
A user has the Standard User profile, which gives no access to Account.Internal_Notes__c. You assign a permission set that grants Read and Edit on that field. The user still cannot see the field. Name two things you should check.
Show answer
First, check that the user (through the profile or another permission set) has Read on the Account object, because FLS does not grant object access. Second, confirm the permission set is actually assigned to this user and that the field permission was saved on the permission set. You could also check that the field is not simply missing from the page layout, although that would affect display rather than access.
Exercise
A profile grants Read only on a field. Permission set A grants Read and Edit on the same field. Permission set B grants no access to it. What can the user do with the field if both sets are assigned?
Show answer
The user can read and edit the field. Permissions are additive, so Edit from permission set A is combined with the profile's Read. Permission set B grants nothing and removes nothing.