Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>sfdx-fetch-allNew to Visual Studio Code? Get it now.
sfdx-fetch-all

sfdx-fetch-all

Apical Cloud Solutions Ltd.

|
65 installs
| (0) | Free
This extension will fetch all org metadata.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SFDX Command Runner

Overview

The SFDX Command Runner is a Visual Studio Code extension designed to automate Salesforce DX (SFDX) tasks. It simplifies retrieving metadata, running SOQL queries, and processing Salesforce metadata files using SFDX commands directly from VS Code.

Key Features:

  • Retrieve metadata with sfdx force:source:retrieve.
  • Execute SOQL queries to fetch customizable objects.
  • Save SFDX commands from a JSON file to a .txt file.
  • Run commands sequentially from a text file.

Installation

  1. Install the extension:

    • Clone the repository or download it from the VS Code Marketplace (if published).
    • Run the following command to install dependencies:
      npm install
      
  2. Launch the extension:

    • Open the extension in VS Code.
    • Press F5 to run and debug the extension in a new VS Code window.
  3. Activate the extension:

    • Open the Command Palette in VS Code (Ctrl+Shift+P or Cmd+Shift+P on macOS).
    • Type Run SFDX Command and hit Enter.

Commands

1. Run SFDX Command

This command:

  • Executes an SOQL query to retrieve all customizable objects from Salesforce.
  • Saves a list of SFDX metadata retrieve commands to a text file based on a JSON input file.
  • Sequentially executes all SFDX commands from the generated file.

2. Retrieve Metadata

  • Retrieves metadata using the command sfdx force:source:retrieve --metadata <metadataType>, where <metadataType> is fetched from a JSON file.

Usage

  1. Open your VS Code workspace where Salesforce DX is set up.

  2. Ensure the following files exist in the root of your project:

    • outputfilename.json: A JSON file containing metadata objects to retrieve.
    • The JSON file should have the following structure:
      {
        "metadataObjects": [
          { "xmlName": "CustomObject" },
          { "xmlName": "ApexClass" }
        ]
      }
      
  3. The extension will:

    • Parse the outputfilename.json file.
    • Generate a list of SFDX commands to retrieve metadata.
    • Save the commands in sfdx_commands.txt.
    • Execute each command in sequence.

Example Workflow

  1. In your Salesforce project, create a outputfilename.json file with your metadata types.
  2. Open Command Palette (Ctrl+Shift+P or Cmd+Shift+P).
  3. Run the command: Run SFDX Command.
  4. Watch the Output panel for command execution results.

Files

  • outputfilename.json: The JSON file containing metadata types to retrieve.
  • sfdx_commands.txt: Generated by the extension, containing SFDX retrieve commands based on the JSON file.
  • output.txt: Contains the result of SOQL queries or command outputs.

Requirements

  • Node.js: Ensure you have Node.js installed.
  • Salesforce CLI (SFDX): Make sure sfdx is installed and properly configured on your system.
    • Install it from the official documentation here.
  • VS Code: Install Visual Studio Code.

Development

To contribute or customize this extension:

  1. Clone the repository:
    git clone https://github.com/your-repo/sfdx-command-runner.git
    cd sfdx-command-runner
    
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft