Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Open Salesforce RecordNew to Visual Studio Code? Get it now.
Open Salesforce Record

Open Salesforce Record

Harrier

|
86 installs
| (2) | Free
Opens salesforce records in Salesforce
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Open Salesforce Record - VS Code Extension

Description

The "Open Salesforce Record" extension for Visual Studio Code allows developers to quickly open Salesforce metadata files in the Salesforce org, directly from the VS Code editor. This is particularly useful for navigating to specific metadata components in Salesforce without manually searching for them.

Features

  • Automatically open Salesforce records directly from your VS Code editor.
  • Supports various metadata types including Permission Sets, Custom Fields, Layouts, Record Types, Flows, FlexiPages, Validation Rules, Apex Classes, and Custom Applications.
  • Utilizes the Salesforce CLI (sfdx OR sf) to interact with your Salesforce org.

Installation

  1. Install Salesforce CLI if you haven't already: Salesforce CLI Installation Guide
  2. Install the extension from the Visual Studio Code Marketplace.

Usage

  1. Open a metadata file in your VS Code editor.
  2. Run the command Open Salesforce Record from the Command Palette (Ctrl+Shift+P).

Supported Metadata Types

  • Aura
  • Platform Cache Partition
  • PermissionSet
  • CustomField
  • Layout
  • RecordType
  • EmailTemplate
  • Flow
  • Profile
  • FlexiPage
  • ValidationRule
  • ApexClass
  • CustomApplication

How It Works

  1. Detecting Metadata Type: The extension detects the metadata type based on the file path and name.
  2. Constructing SOQL Query: For certain metadata types, the extension constructs a SOQL query to retrieve the record ID from Salesforce.
  3. Opening the Record: The extension then opens the specific record in Salesforce using the appropriate CLI command.

Example File Paths and Metadata Types

  • permissionsets/MyPermissionSet.permissionset-meta.xml ➔ PermissionSet
  • objects/MyObject/fields/MyField.field-meta.xml ➔ CustomField
  • layouts/MyObject-MyLayout.layout-meta.xml ➔ Layout
  • objects/MyObject/recordTypes/MyRecordType.recordType-meta.xml ➔ RecordType
  • flows/MyFlow.flow-meta.xml ➔ Flow
  • flexipages/MyFlexiPage.flexipage-meta.xml ➔ FlexiPage
  • objects/MyObject/validationRules/MyValidationRule.validationRule-meta.xml ➔ ValidationRule
  • classes/MyApexClass.cls-meta.xml or classes/MyApexClass.cls ➔ ApexClass
  • applications/MyCustomApplication.app-meta.xml ➔ CustomApplication

Command Execution

  • Without Query: For metadata types like Flow and FlexiPage, the extension directly constructs the URL and opens it.
  • With Query: For other metadata types, the extension executes a SOQL query using the Salesforce CLI to get the record ID and then constructs the URL to open it in the browser.

Configuration

Ensure you are authenticated to your Salesforce org using Salesforce CLI. Use the command:

sfdx force:auth:web:login
OR
sf org login web
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft