How to Deploy FLS of any field in a profile

Updated 1 month ago by David Venegas

In order to deploy field level security for any field in a profile you must select both the profile(s) and the fields in the commit page or in the Metadata deployment step.

Commit FLS in a User Story or Git Snapshot

When moving FLS of a newly created field, select the following:

  1. Profile(s) for which this field should be accessible.
  2. CustomField.

When moving FLS of an existing field, select the following:

  1. Profile(s) for which this field should be accessible.
  2. CustomField (Marked as Retrieve Only).

In the example image below, a new custom field Account.External_Id__c was selected along with a profile. The other two fields already existed and it's only necessary to deploy the FLS for these fields in the profile, therefore they're marked as Retrieve Only.

The profile will not be committed with all its references, only the FLS changes for the selected fields and the User Permissions will be committed.

To commit a profile with all its references, use the Full Profiles & Full Permission Sets git operation.
Fields marked as Retrieve Only will not get committed nor deployed, only the FLS for these fields will be committed and deployed.
You can ignore User Permissions by adding Global Find and Replace (YAML) rules in the Deployment Flow or in the Environment records.

Select FLS in a Metadata Deployment Step

When doing an Org to Org deployment, simply add a Metadata deployment step and select the profile and the fields.

The profile is not deployed with all its references, only the FLS for the selected fields and the User Permissions get deployed.

You can ignore User Permissions by adding Global Find and Replace (YAML) rules in your Environment records.
Click here to learn how to deploy FLS for activity fields.


How did we do?