How to bulk edit field-level security in Salesforce
You added 40 new fields and five profiles need access. Salesforce Setup lets you change field-level security (FLS) one field or one profile at a time. Here are three ways to do it in bulk, from slowest to fastest.
Before you start
- Salesforce recommends giving field access through permission sets, not profiles. The steps below work for both.
- Edit access always needs Read access. Formula, roll-up and some system fields can only be Read.
- Try it in a sandbox first if many users are affected.
Option 1: Setup (one field or one profile at a time)
One field, many profiles
- Setup → Object Manager → pick the object → Fields & Relationships.
- Open the field and click Set Field-Level Security.
- Tick Visible and Read-Only for each profile, then Save.
One profile or permission set, many fields
- Setup → Profiles (or Permission Sets) → open it.
- Go to Object Settings → pick the object → Edit.
- Tick Read Access and Edit Access for each field, then Save.
This is fine for a few fields. For 40 fields × 5 profiles it is 200 clicks and easy to get wrong.
Option 2: Data Loader with the FieldPermissions object
Every FLS setting is a FieldPermissions record. Profiles also have a hidden permission set, so this works for profiles too.
- Export the permission set Ids you need:
SELECT Id, Name, Profile.Name FROM PermissionSet WHERE IsOwnedByProfile = true OR Name = 'My_Perm_Set'
- Build a CSV with the columns
ParentId(the PermissionSet Id),SobjectType(for exampleAccount),Field(for exampleAccount.Region__c),PermissionsReadandPermissionsEdit(true/false). - Use Insert in Data Loader for new rows. To change existing access, export the current rows first with
SELECT Id, ParentId, Field, PermissionsRead, PermissionsEdit FROM FieldPermissions WHERE SobjectType = 'Account'
and use Update by Id. To remove access completely, delete the row.
Fast, but you work blind in a spreadsheet, and there is no undo if a column is wrong.
Option 3: A grid with review and rollback (SF Manager)
SF Manager is a free Chrome extension that shows FLS as a grid: fields down the side, profiles across the top.
- Open SF Manager on your org and go to Security & Access → FLS & Permissions, then click Load profiles & objects.
- Turn on Multi-profile and pick the profiles. Search for the object and expand it.
- Tick Read / Edit per field, use the object row to set every field at once, or use Bulk action for all loaded fields. Changed cells turn amber.
- Click Apply Changes, check the before/after list, then Push.
- Made a mistake? Rollback puts the previous access back, and Audit Trail keeps the history.
It also has Clone FLS (copy one profile's field access to others) and CSV Tools to export the grid, edit it in Excel and import it back for review.