How To Configure Visual Studio Code For Salesforce
Step By Step Configuration Guide:-
Step 1:-Install latest version of visual studio from the link given Visual Studio Code and Launch VS Code
Step 2:-To install extensions --Red mark shows the extension from where you have to install following extension
Step 3:- Create Project :-Press Ctrl+Shift+P and "Create project with Manifest".
It will ask to "Enter Project Name" then press enter and will redirect to project location where you want to create the project.
The Manifest File generated from extension Salesforce Package.xml Generator Extension for VS Code ,which will used to retrieve,deploy,delete and create any Metadata in VS Code Editor / deploy to Salesforce Org.
Step 4:-Authentication of your Organisation :- Salesforce org. Authorisation by providing username and password via "Salesforce CLI (Command Line Interface) Integration" Extension.This extension is part of Salesforce Extension Pack so no need to install again.
Now you have to press Ctrl+ Shift +P and search "SFDX: Authorize an Org" . After pressing enter salesforce authentication page will be open in default browser.
![]() |
Authorize SFDC Org. |
![]() |
Choose Your Environment |
Step 5 :- Choose Metadata Component and Update Package.xml File In "Step 3"if you want to Update your manifest file then press Ctrl+ Shift +P and search "SFDX: Package.xml Generator: Choose Metadata Component" and Choose metadata component you want to retrieve in your Created Project.
![]() |
Select Package.xml Generator |
![]() |
In my case i choosen Only Two Metadata (Apex class and Apex Trigger) |
![]() |
Updated Package.xml (in Manifest File) |
![]() |
Retrieve Metadata Component |
After that Closing and Opening the Editor See Apex Class And Apex Trigger in "force-App" Section. All the Classes And Triggers will available in Apex Class And Apex Trigger Metadata respectively.
![]() |
Apex Triggers Retrieved |
![]() |
Retrieve And Deploy Changes To / And From Org |
Step 8:- Now you can start you coding with Visual Studio Code Editor.
Comments
Post a Comment