Skip to main content
Security

What is Field-Level Security (FLS) in Salesforce?

Updated · By the Clientell AI team · How we write

Field-Level Security (FLS) is the Salesforce setting that decides, for each field, whether a user can read it, edit it, or not see it at all. Admins set FLS on profiles and permission sets. It applies on record pages, list views, reports and the API, but it does not decide which records a user can open.

Key facts

Full form
FLS = Field-Level Security
Access levels
Read Access, Edit Access (includes Read), or neither, which hides the field (Salesforce Help)
Set on
Profiles and permission sets (permission sets are the recommended place)
Enforced in
Detail and edit pages, related lists, list views, reports and the Salesforce APIs
Does not control
Which records a user can see. That is sharing.
Conflict rule
The most restrictive of FLS and the page layout wins

Clientell AI, the AI Salesforce admin, audits your FLS setup in a read-only scan, then drafts the fixes. See permission management

Try it in Clientell AI

“Audit my FLS setup: show where access is too open, list who has more than they need, and draft fixes for me to approve.”

Clientell AI reads your org first. Platform deployments include rollback. How security works.

Start the 14-day free trial, no card

How does field-level security work?

A Salesforce object can hold many fields. Some are fine for everyone. Others, like salary, discount or a national ID number, should be limited. FLS lets you hide or lock a single field for a group of users without hiding the whole object.

For each field you give a user one of three levels. Read and Edit means full access. Read means view only. No access means the field is hidden. Salesforce enforces this no matter how the user reaches the data: a record page, a related list, a report or an API call.

What is the difference between FLS, object permissions and sharing?

Salesforce checks access in layers. Each layer answers a different question. People often mix them up, which is why a user can see a record but not a field, or the other way round.

LayerQuestion it answersWhere you set it
Object permissionsCan the user create, read, edit or delete records of this object?Profile or permission set
Field-level securityWhich fields on those records can the user see or change?Profile or permission set
Sharing (OWD, roles, sharing rules)Which individual records can the user open?Org-wide defaults, role hierarchy, sharing rules, manual sharing

How do you set FLS in Salesforce?

You can set field permissions in three places. Pick the one that fits the job.

  • On one field for every profile: Setup > Object Manager > Account > Fields & Relationships > AnnualRevenue > Set Field-Level Security. Tick Visible (or Read-Only) per profile and save.
  • On a permission set: Setup > Permission Sets > your set > Object Settings > Accounts > Edit, then set Read Access and Edit Access per field. This is the model Salesforce recommends.
  • On a profile: edit the profile and set field permissions per object. Every user has exactly one profile, so profile FLS is the baseline.
  • At field creation: there is a setting that lets you assign FLS to permission sets instead of profiles when you create a field.

Example: hide a salary field from everyone except HR

Say the custom field Employee__c.Salary__c must be visible only to HR. Do it in a sandbox first.

  • 1. Setup > Object Manager > Employee > Fields & Relationships > Salary > Set Field-Level Security.
  • 2. Clear Visible for every profile, including Standard User. Save.
  • 3. Setup > Permission Sets > New. Name it HR Salary Access.
  • 4. In the set, open Object Settings > Employees > Edit, and tick Read Access and Edit Access for Salary. Save.
  • 5. Assign the set to HR users only.
  • 6. Check: log in as a sales user. Salary is gone from the record page, list views, reports and API queries.
  • 7. To undo, remove the permission set assignment or tick Visible again on the profile.

Why can a user still see a field you hid?

Profiles, permission sets and permission set groups only grant access. They do not take it away. If a user has Read and Edit on a field through any one of their permission sets, that wins over a more limited profile.

This is the most common cause of the question, why can this user still see the field. To find the cause, check the user's profile and every permission set and permission set group assigned to them. Look for any one that grants the field.

The practical rule: keep the profile minimal and grant extra field access through named permission sets. Then removing a permission set actually removes the access.

Does FLS override the page layout?

A page layout controls which fields are shown and whether they are required. FLS controls whether the user may see or edit them. When the two disagree, the stricter setting wins. A field set as required on the layout is still read only if FLS gives only Read. A field with no FLS access does not appear even if it sits on the layout.

Because FLS also applies in reports, list views and the API, it is the right tool for protecting sensitive data. Hiding a field on the layout alone only hides it on that page.

What are common FLS mistakes?

Most field access bugs trace back to one of these. Each has a quick fix.

  • Hiding a sensitive field only on the page layout. Fix: remove Read Access in FLS, since layouts do not protect reports or the API.
  • Granting field access on many profiles. Fix: keep profiles minimal and grant fields through named permission sets.
  • Forgetting permission set groups when auditing. Fix: check the profile, every permission set and every group the user holds.
  • Making a field required on the layout while FLS is Read only. Fix: give Edit Access to the users who must fill it.
  • Writing Apex on an old API version without user mode. Fix: add WITH USER_MODE or move the class to API version 67.0 or later.

How do you enforce FLS in Apex and SOQL?

Older Apex runs in system mode, which ignores FLS. That changed with API version 67.0: classes on 67.0 and later run in user mode by default, so the running user's FLS is enforced, and WITH SECURITY_ENFORCED is no longer allowed in SOQL (Salesforce Object Query Language) queries (Apex Developer Guide: Security and Sharing).

On older API versions, enforce FLS yourself. WITH USER_MODE applies object permissions and FLS to the query, and Salesforce recommends it over WITH SECURITY_ENFORCED (Apex Developer Guide: Enforce User Mode). Security.stripInaccessible removes fields the user cannot read from a result.

// Respect the running user's field access
List<Account> accts = [
    SELECT Id, Name, AnnualRevenue
    FROM Account
    WITH USER_MODE
];

// Remove fields the user cannot read
SObjectAccessDecision d = Security.stripInaccessible(
    AccessType.READABLE,
    [SELECT Id, Name, AnnualRevenue FROM Account]
);
List<Account> safe = (List<Account>) d.getRecords();

FAQ: FLS in Salesforce

What is FLS in Salesforce?

FLS is field-level security. It controls whether a user can read, edit or not see each individual field, and it is set on profiles and permission sets.

What is the full form of FLS in Salesforce?

FLS stands for Field-Level Security. It controls access to individual fields, not whole objects or records.

Does FLS control which records a user can see?

No. Object permissions and sharing decide which records a user can open. FLS only decides which fields they can see on records they can already reach.

Should I set FLS on profiles or permission sets?

Salesforce recommends managing access with permission sets. Keep the profile minimal and add field access through permission sets so it is easy to add and remove.

Why can a user still see a field I hid?

Permissions only add access. Check every permission set and permission set group the user has. Any one of them that grants the field will give access.

Does Apex respect FLS?

On API version 67.0 and later, yes, because Apex runs in user mode by default. On older versions, add WITH USER_MODE or use Security.stripInaccessible (Apex Developer Guide).

Getting Started

Try this on your own org

Start the 14-day free trial, no card. Clientell AI asks before it changes anything in production.

14-day free trial  ·  No credit card required

SOC 2
HIPAA
ISO 27001
Salesforce Partner