F

Field-Level Security (FLS)

Salesforce's per-field read and edit permission control — the mechanism that keeps an Agentforce agent from seeing or changing fields it shouldn't.

What it is

Field-Level Security, or FLS, is a Salesforce access control that governs whether a given user can read or edit each individual field on an object, set through profiles and permission sets. Even if someone can open a record, FLS decides which fields on that record are visible and which are editable. It is the finest-grained layer of Salesforce's permission model, sitting beneath object permissions and sharing rules, and it is enforced at the platform level across the UI, reports, and the API.

Why it matters

FLS is the concrete control that keeps an Agentforce agent inside its lane. Agentforce agents run as a specific user and are bound by that user's object permissions, Field-Level Security, and sharing rules, so an agent literally cannot read or write a field the running user is not permitted to touch. That turns an abstract goal — least privilege for a digital worker — into a configuration you set in the Salesforce UI rather than code you have to trust. If a support agent should never see a Social Security number or a contract's margin field, you remove read access via FLS on its permission set, and the platform enforces it for every prompt, forever. This is why FLS is the load-bearing answer to 'how do we know the agent won't expose something it shouldn't.'

Key capabilities

  • Controls read and edit access per field, independent of whether the record itself is visible
  • Configured through profiles and permission sets, not custom code
  • Enforced platform-wide across the UI, reports, SOQL, and the API
  • Applies to Agentforce agents through the running user's permissions, scoping what an agent can see and change
  • Complements object permissions and sharing rules as the most granular layer of Salesforce access
  • Auditable and reversible, so access can be tightened or granted without touching business logic

How it works

  1. Define a permission set that represents what an agent, or its running user, is allowed to do
  2. Set each sensitive field to hidden or read-only on that permission set via Field-Level Security
  3. Assign the permission set to the user the Agentforce agent runs as
  4. When the agent queries or updates a record, the platform checks FLS on every field
  5. Fields the running user cannot read are withheld from the agent; fields it cannot edit reject writes
  6. Adjust FLS as the agent's role changes, and the new limits apply immediately with no redeployment

Examples

Hiding a sensitive field from an agent

A billing support agent runs as a user whose permission set hides the Contact's SSN field and makes the Account's internal margin read-only. The agent can resolve billing questions and update case status, but it physically cannot read the SSN or change the margin, because FLS blocks it at the platform level.

Good to know

A subtle trap: custom Apex classes declared 'without sharing' or code that queries with elevated permissions can bypass FLS, so an agent invoking such an action may see data its running user cannot. If you build custom actions for an agent, enforce FLS in Apex with WITH SECURITY_ENFORCED or Security.stripInaccessible() so the code honors the same field-level limits the platform does everywhere else.

Need Help Implementing This?

We specialize in putting AI and Agentforce to work for Salesforce customers. Let's talk about your use case.

Book Intro Call