Close Menu
SalesforceCodex
    Facebook X (Twitter) Instagram
    Trending
    • Top 10 Salesforce Flow Features of Salesforce Summer ’25
    • Unlock the Power of Vibe Coding in Salesforce
    • How to Implement Dynamic Queueable Chaining in Salesforce Apex
    • How to Implement Basic Queueable Chaining in Salesforce Apex
    • How to Suppress PMD Warnings in Salesforce Apex
    • Top 10 PMD Issues Salesforce Developers Should Focus on in Apex
    • How to Use Graph API for Outlook-Salesforce Connection
    • Enhancing Performance with File Compression in Apex
    Facebook X (Twitter) Instagram
    SalesforceCodex
    Subscribe
    Friday, May 16
    • Home
    • Architecture
    • Salesforce
      • News
      • Apex
      • Integration
      • Books Testimonial
    • Questions
    • Certification
      • How to Prepare for Salesforce Integration Architect Exam
      • Certification Coupons
    • Integration Posts
    • Downloads
    • About Us
      • Privacy Policy
    SalesforceCodex
    Home»Salesforce»Salesforce Development in Visual Studio Code

    Salesforce Development in Visual Studio Code

    Dhanik Lal SahniBy Dhanik Lal SahniOctober 13, 20186 Comments3 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    Salesforce Development in Visual Studio Code
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Salesforce Development in Visual Studio Code


    Force.com has discontinued its IDE for further development process. Instead of Force.com IDE, Salesforce Extensions for VS Code is recommended.

    Visual Studio Code is a source code editor developed by Microsoft for all major OS like Windows, Linux and macOS. It includes support for debugging, embedded Git control, syntax highlighting, intelligent code completion, snippets, code refactoring and test coverage.

    For working in Visual Studio Code for Salesforce development, Four major steps are there
    1. Authenticate Visual Studio Code with Salesforce Org
    2. Code Retrieval
    3. Code Changes
    4. Code Deployment.

    Before starting, install Visual Studio Code from https://code.visualstudio.com/
    Once Visual Studio Code is installed, install extensions Salesforce Extensions for VS Code and ForceCode by clicking highlighted icon.

    Let us now start each step one by one.
    1. Authenticate Visual Studio Code with Salesforce Org:
    We have to authorize Visual studio code to connect and get/save code. You can connect with Dev Org for this exercise.

    Before connecting with Org, first open folder where code will be retrieved. Click highlighted button to open folder. You can also use File->Open Folder to open folder.

    Open command window from View->Command Palette. It will open popup like below screenshot.

    In that window, write ForceCode: ForceCode Menu to authenticate using dev org. Select New Org from list to start authentication process.

    This will open org selection popup. You can select Sandbox or production org from list. Let us select Sandbox/Test for connecting with dev Org.


    This will open org login page. Login into org to step in next process.

    Once authentication is successful, we will get src folder and json files as shown in below image in opened folder. In footer/tray one menu ForceCode Menu is also added.

    2. Code Retrieval
    Now Visual Studio Code is connected with Dev Org. Let us retrieve code from org. You can retrieve complete code or you can use package.xml to get specific code.

    Click ForceCode menu from bottom or View->Command Palette. This will open popup to select connected Org. Select org which you have connected.

    Once you selected org. It will open another popup to set behavior to save on server. If you select yes, each time you save code it will deploy code to connected org. So let us select No, we will deploy code once we complete one code block.

    Let us get code from below package.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <Package xmlns="http://soap.sforce.com/2006/04/metadata">
       <types>
            <members>TestClass</members>
            <name>ApexClass</name>
        </types>
        <version>44.0</version>
    </Package>
    

    Open command palette once again and select Retrieve package/Metadata to get code.

    It will open list of options to get code. Select first option Retrieve by package.xml

    It will get code as mentioned in Package.xml.

    3. Code Changes
    After code is retrieved, do your changes. For example I have added code
    * Code Chage from Visual Studio Code*/

    4. Code Deploy
    Let us deploy this code change to dev org. Open command palette once again and select Deploy package.

    On another popup select Deploy from package.xml to deploy code from package.

    Once deployement process, it will show status in output window.

    Summary:
    Visual Studio is very light tool for coding and performance wise also it is very fast. All features of Salesforce can be used here.

    Apex code IDE IDE for Salesforce Development salesforce Salesforce IDE Visual Studio Code
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleException Logging in Custom Object : Salesforce Apex
    Next Article Visual Studio Code and Code Versioning in TFS
    Dhanik Lal Sahni
    • Website

    Related Posts

    By Dhanik Lal Sahni6 Mins Read

    Top 10 Salesforce Flow Features of Salesforce Summer ’25

    May 11, 2025
    By Dhanik Lal Sahni6 Mins Read

    Unlock the Power of Vibe Coding in Salesforce

    April 30, 2025
    By Dhanik Lal Sahni5 Mins Read

    How to Implement Dynamic Queueable Chaining in Salesforce Apex

    April 21, 2025
    View 6 Comments

    6 Comments

    1. Kishan on October 23, 2018 12:41 am

      Thank You For sharing such a wonderful Article on Visual Studio code IDE with SFDC

      Reply
      • Dhanik Lal Sahni on October 23, 2018 5:59 pm

        Thank You Kishan.

        Reply
    2. Madhu on October 29, 2018 9:59 pm

      Well explained in step by step. Easy to configure. Thank you for the post.

      Reply
      • Dhanik Lal Sahni on November 2, 2018 12:03 am

        Thank You Madhu.

        Reply
    3. Michael Shumenko on August 20, 2019 9:24 pm

      JetForcer is a powerful and modern IDE for Salesforce development.
      Just try it out at compare with VSCode.

      https://jetforcer.com/

      Reply
    4. Gugulothu Anil on September 27, 2019 2:15 pm

      very helpful

      Reply
    Leave A Reply Cancel Reply

    Ranked #1 SALESFORCE DEVELOPER BLOG BY SALESFORCEBEN.COM
    Featured on Top Salesforce Developer Blog By ApexHours
    Recent Posts
    • Top 10 Salesforce Flow Features of Salesforce Summer ’25
    • Unlock the Power of Vibe Coding in Salesforce
    • How to Implement Dynamic Queueable Chaining in Salesforce Apex
    • How to Implement Basic Queueable Chaining in Salesforce Apex
    • How to Suppress PMD Warnings in Salesforce Apex
    Ranked in Top Salesforce Blog by feedspot.com
    RSS Recent Stories
    • How to Connect Excel to Salesforce to Manage Your Data and Metadata February 9, 2025
    • Difference Between With Security and Without Security in Apex January 2, 2025
    • Top Reasons to Love Salesforce Trailhead: A Comprehensive Guide December 5, 2024
    • How to Utilize Apex Properties in Salesforce November 3, 2024
    • How to Choose Between SOQL and SOSL Queries July 31, 2024
    Archives
    Categories
    Tags
    apex (110) apex code best practice (8) apex rest (11) apex trigger best practices (4) architecture (22) Asynchronous apex (9) AWS (5) batch apex (9) batch processing (4) code optimization (8) code review tools (3) custom metadata types (5) design principle (9) einstein (3) flow (15) future method (4) google (6) google api (4) integration (19) integration architecture (6) lighting (8) lightning (64) lightning-combobox (5) lightning-datatable (10) lightning component (29) Lightning web component (61) lwc (50) named credential (8) news (4) optimize apex (3) optimize apex code (4) Permission set (4) Queueable (9) rest api (23) S3 Server (4) salesforce (140) salesforce apex (46) salesforce api (4) salesforce api integration (5) Salesforce Interview Question (4) salesforce news (5) salesforce question (5) solid (6) tooling api (5) Winter 20 (8)

    Get our newsletter

    Want the latest from our blog straight to your inbox? Chucks us your detail and get mail when new post is published.
    * indicates required

    Ranked #1 SALESFORCE DEVELOPER BLOG BY SALESFORCEBEN.COM
    Featured on Top Salesforce Developer Blog By ApexHours
    Recent Posts
    • Top 10 Salesforce Flow Features of Salesforce Summer ’25
    • Unlock the Power of Vibe Coding in Salesforce
    • How to Implement Dynamic Queueable Chaining in Salesforce Apex
    • How to Implement Basic Queueable Chaining in Salesforce Apex
    • How to Suppress PMD Warnings in Salesforce Apex
    Ranked in Top Salesforce Blog by feedspot.com
    RSS Recent Stories
    • How to Connect Excel to Salesforce to Manage Your Data and Metadata February 9, 2025
    • Difference Between With Security and Without Security in Apex January 2, 2025
    • Top Reasons to Love Salesforce Trailhead: A Comprehensive Guide December 5, 2024
    • How to Utilize Apex Properties in Salesforce November 3, 2024
    • How to Choose Between SOQL and SOSL Queries July 31, 2024
    Archives
    Categories
    Tags
    apex (110) apex code best practice (8) apex rest (11) apex trigger best practices (4) architecture (22) Asynchronous apex (9) AWS (5) batch apex (9) batch processing (4) code optimization (8) code review tools (3) custom metadata types (5) design principle (9) einstein (3) flow (15) future method (4) google (6) google api (4) integration (19) integration architecture (6) lighting (8) lightning (64) lightning-combobox (5) lightning-datatable (10) lightning component (29) Lightning web component (61) lwc (50) named credential (8) news (4) optimize apex (3) optimize apex code (4) Permission set (4) Queueable (9) rest api (23) S3 Server (4) salesforce (140) salesforce apex (46) salesforce api (4) salesforce api integration (5) Salesforce Interview Question (4) salesforce news (5) salesforce question (5) solid (6) tooling api (5) Winter 20 (8)

    Get our newsletter

    Want the latest from our blog straight to your inbox? Chucks us your detail and get mail when new post is published.
    * indicates required

    Facebook X (Twitter) Instagram Pinterest YouTube Tumblr LinkedIn Reddit Telegram
    © 2025 SalesforceCodex.com. Designed by Vagmine Cloud Solution.

    Type above and press Enter to search. Press Esc to cancel.

    Ad Blocker Enabled!
    Ad Blocker Enabled!
    Our website is made possible by displaying online advertisements to our visitors. Please support us by disabling your Ad Blocker.