Salesforce Setup Navigator
Jump from a local Salesforce metadata file straight to the matching Salesforce Setup page — without copying API names and searching through Setup by hand.
Right-click a supported metadata file in VS Code and pick a Salesforce action: open it in Setup, copy a shareable Setup URL, open the Developer Console, or switch the target org.
Features
| Command |
What it does |
| Salesforce: Open in Setup |
Opens the matching Setup page for the selected metadata in your browser. |
| Salesforce: Copy Setup URL |
Copies a clean, shareable Setup URL to the clipboard. |
| Salesforce: Open Developer Console |
Opens the Developer Console — focused on the selected Apex class/trigger/page when it can be resolved. |
| Salesforce: Select Org |
Picks which authenticated org to target, and remembers it. |
Apex Class · Apex Trigger · Visualforce Page · Flow · Custom Object · Custom Field · Validation Rule.
Right-click any of these in the Explorer or editor and use the Salesforce ▸ submenu. Flows open in Flow Builder; objects/fields/validation rules open in Object Manager.
Requirements
- Salesforce CLI (
sf) installed and on your PATH.
- An authenticated org (
sf org login web).
- A project that follows the standard Salesforce DX source format (
force-app/main/default/…).
The extension delegates all authenticated work to the Salesforce CLI — it never reads or stores your access token. "Copy Setup URL" produces a plain instance URL (the recipient must be logged into the org), not a tokenized link.
How it works
- The metadata type and names are detected from the file path.
- The target org is resolved from the
salesforceSetupNavigator.targetOrg setting, or your CLI's default target-org.
- For items that need a Salesforce record id (Apex, Custom Field, Validation Rule), the id is looked up on demand via the Tooling API (
sf data query --use-tooling-api).
- The page is opened with
sf org open (which handles login), or — for Flows — sf org open --source-file opens the associated Builder.
If an exact deep link can't be resolved (for example, the metadata hasn't been deployed to the org yet), the extension gracefully opens the relevant Setup list page instead and tells you.
Settings
| Setting |
Default |
Description |
salesforceSetupNavigator.targetOrg |
"" |
Alias or username of the org to open. Empty = use the project's default org. Set it via Salesforce: Select Org. |
salesforceSetupNavigator.salesforceCliPath |
"sf" |
Path to the Salesforce CLI executable. |
Known limitations
- Salesforce does not publish stable deep links for every Setup page; unresolved items fall back to a list page.
- Open Developer Console uses an unofficial Salesforce URL (
ApexCSIPage?action=openFile) to open the selected Apex class/trigger/page directly. It is not officially supported and may change; on a freshly-opened ("cold") console the file tab can briefly show as undefined.apxc until Salesforce resolves the name — it loads reliably when the Developer Console is already open. If the id can't be resolved, the command opens the console itself.
- Custom fields/objects from managed packages are matched by their bare developer name and namespace; Apex classes, triggers, and Visualforce pages are matched by name only.
- Multi-select in the Explorer acts on the file you right-clicked.
Development
npm install # install dev dependencies
npm run compile # type-check (tsc)
npm test # run unit tests (detector + url builder)
npm run bundle # produce dist/extension.js (esbuild)
npm run package # produce a .vsix (requires the publisher field below)
Press F5 in VS Code to launch an Extension Development Host with the extension loaded.
Before publishing to the Marketplace, set a real publisher id in package.json (currently your-publisher-id) and add an extension icon.
License
MIT