Salesforce Profile / Permission Set FLS Manager
A VS Code extension for bulk updating and deleting Salesforce Field Level Security (FLS) in Profiles and Permission Sets using Excel files.
- Profiles (
*.profile-meta.xml)
- Permission Sets (
*.permissionset-meta.xml)
Supported Operations
Upsert FLS
- Update existing field permissions
- Insert new field permissions
- Preserve existing XML formatting and namespaces
- Maintain logical field ordering when inserting new permissions
Delete FLS
- Remove field permissions from specific Profiles/Permission Sets
- Remove field permissions from all files in a folder
- Remove all occurrences of a field permission if duplicates exist
Installation
Install the extension in VS Code and open your Salesforce project.
Usage
Open the Command Palette:
Ctrl + Shift + P
Run:
Salesforce XML Manager: Run
The extension opens with two tabs:
Upsert FLS
The Excel file must contain the following columns:
| Filename |
Object API Name |
Field API Name |
Read |
Edit |
Example
| Filename |
Object API Name |
Field API Name |
Read |
Edit |
| Admin.profile-meta.xml |
Account |
BillingCity |
TRUE |
TRUE |
| Admin.profile-meta.xml |
Account |
Description |
TRUE |
FALSE |
| Sales.profile-meta.xml |
Lead |
Status |
TRUE |
TRUE |
Steps
- Select the Upsert FLS tab.
- Enter the Profiles/Permission Sets folder path.
- Enter the Excel file path.
- Click Run Update.
The extension will:
- Read the Excel file
- Group updates by filename
- Update existing FLS
- Insert missing FLS
- Save modified XML files
Note: New permissions are inserted in lexicographic ascending order. If the file is not sorted then the permission is inserted at first valid occurance.
Delete FLS
The Excel file must contain the following columns:
| Filename |
Object API Name |
Field API Name |
Example
| Filename |
Object API Name |
Field API Name |
| Admin.profile-meta.xml |
Account |
BillingCity |
| Admin.profile-meta.xml |
Account |
Description |
| Sales.profile-meta.xml |
Lead |
Status |
Apply To All Files
When Apply To ALL Files is checked:
- The Filename column is ignored.
- Matching field permissions are removed from every Profile and Permission Set in the specified folder.
Steps
- Select the Delete FLS tab.
- Enter the Profiles/Permission Sets folder path.
- Enter the Delete Excel file path.
- (Optional) Check Apply To ALL Files.
- Click Run Delete.
The extension will:
- Read the Excel file
- Group deletions by filename
- Remove matching field permissions
- Save modified XML files
Important Notes
Close Excel Before Running
The Excel workbook must be closed before running the extension.
Open workbooks may cause file access errors.
Source Control Recommended
Review generated Git diffs before committing or deploying changes.
Supported Values (Upsert)
Read
TRUE
FALSE
true
false
Edit
TRUE
FALSE
true
false
Limitations
Currently only the following metadata section is supported:
<fieldPermissions>
The extension does not update:
- objectPermissions
- classAccesses
- tabVisibilities
- applicationVisibilities
- recordTypeVisibilities
- layoutAssignments
Common Errors
Excel File Not Found
Excel file does not exist
Verify the Excel file path is correct.
Unable To Read Excel File
Unable to read Excel file
Ensure the workbook is closed.
Missing Required Column
Missing required column
Verify the Excel file headers exactly match the required format.
File not found
Verify the folder path and filename values.
No Matching Fields Found
No matching fields found
The specified field permission does not exist in the target file.
Design Goals
The extension intentionally:
- Preserves existing XML formatting
- Preserves Salesforce XML namespaces
- Minimizes Git diff noise
- Updates only the required
<fieldPermissions> sections
- Does not rebuild entire XML documents