XRL Config Deployment — how to use
Prerequisites
- Salesforce CLI (
sf) installed and on your PATH (or configure the path in settings — see below).
- A default org authorized for the CLI (
sf org login web, set default with sf config set target-org <alias>).
Open your config file
Open a JSON or JavaScript file that describes your XRL config. The extension activates when you run a command from the Command Palette or the editor context menu (right‑click in the editor).
Config file shape
The root object must include:
sObjApiName — Salesforce object API name (e.g. extRelListConfig__c).
records — array of rows to deploy or retrieve.
Each row must include a uniq key for upsert/retrieve (by default XRL__uniqKey__c, or a namespaced field ending in XRL__uniqKey__c). Set XRL Config Deployment › External Id Field if your API name differs.
Optional JavaScript-style configs use configType / fileType as described in your project; the extension converts JS records to JSON when needed for deploy.
Deploy XRL Config
- Open your JSON or JS file.
- Run Deploy XRL Config (Command Palette, or right‑click in the editor → Deploy XRL Config).
The extension uses the default Salesforce org from the CLI, upserts records by the uniq key field, and does not send Id in the PATCH body. Progress and errors appear in the Output panel: channel XRL Config Deployment.
Retrieve XRL Config from Org
- Open a JSON or JS file that already lists the rows you want (with
sObjApiName and uniq keys per record).
- Run Retrieve XRL Config from Org (Command Palette, or right‑click in the editor).
Fetches each row from the org by external id and replaces successful records[] entries with the server data. Rows that fail (e.g. not found in the org) are left unchanged. The file is updated and saved. Common Salesforce system fields on the response (for example attributes, audit timestamps, OwnerId, Name, IsDeleted) are removed before writing.
Settings
Open Settings and search for XRL Config Deployment, or edit settings.json:
| Setting |
Purpose |
External Id Field (xrlConfigDeployment.externalIdField) |
API name of the uniq key field (default: XRL__uniqKey__c). |
Batch Size (xrlConfigDeployment.batchSize) |
Parallel upsert/retrieve requests (default: 5). |
Sf: Path (xrlConfigDeployment.sfPath) |
Full path to sf / sf.cmd if VS Code cannot find the CLI (e.g. on Windows). You can also set env SF_CLI_PATH. |
Troubleshooting
- If
sf not found on PATH inside VS Code, set Sf: Path or launch VS Code from a terminal where sf works (code .).
- Check View → Output, select XRL Config Deployment, for detailed messages.