Easy Way to Integrate Salesforce CLI with Visual Studio Code

What is Salesforce CLI?

Salesforce CLI is a command-line interface that simplifies development and builds automation when working together with your Salesforce org. Use it to form and manages a sandbox environment, synchronize source to and from your sandbox environment, create and install packages, and more.

Need to install two extensions in your visual studio code like that :

  • Salesforce CLI Integration
  • Salesforce Extension Pack

salesforce cli

After that download SFDX CLI on a local machine like that :

  1. If you are using Ubuntu then please download CLI using this link: Salesforce CLI for ubuntu:Extract this tar file and open the folder in the terminal and write ./install then the CLI is installed.
  1. If you are using Windows then please download CLI using this link: Salesforce CLI for Windows:
    Select the CLI version according to your system requirement and then download and after install it.

And After Install the SFDX CLI we need to check the sfdx version in our system using this command in Windows or Ubuntu OS: sfdx version

sfdx version

dont miss out iconDon't forget to check out: Set Up GIT in Visual Studio Code in macOS | Salesforce Developer Guide

After That Create a New Project with Manifest using this command:

Step 1: ctrl+shift + p then enter

Manifest

Step 2: Enter the standard project

Step 3: Enter the project name here

and then save it.

Again, ctrl + shift + p

project default

if you are login into your production org then enter the production link.

if you are login on to your sandbox org then enter the sandbox link.

dont miss out iconCheck out another amazing blog by Aman here: Knowledge of Salesforce User Licenses and its Types

To deploy your code from vs code to your sandbox org or your development org using Deploy Source To Org like that:

sandbox link

To deploy your code from sandbox org or your development org to your vs code using Retrieve Source from Org like that:

development org

Responses

Popular Salesforce Blogs