Visual Studio Code - SFDX

Tools and Resources
Setup

  1. Install Visual Studio Code

  2. Install Salesforce Extensions

  3. Set Environment Variables (add all)

    1. SFDX_DISABLE_DNS_CHECK=true
      NODE_TLS_REJECT_UNAUTHORIZED=0
      http_proxy=http://proxy.toronto.ca:8080
      https_proxy=http://proxy.toronto.ca:8080
      HTTP_PROXY=http://proxy.toronto.ca:8080
      HTTPS_PROXY=http://proxy.toronto.ca:8080

  4. Open Visual Studio Code

    1. File > New Window

    2. Open command pallet (PC: ctrl+shift+p / Mac: cmd+shift+p)

      1. >SFDX: Create Project

      2. Create Project > Standard >

        • This aligns to the local folder name

        • You should use a unique name e.g. struat and press <enter>

        • For the city we typically use city-of-toronto--struat.sandbox.lightning.force.com as our sandbox environments. So I use struat

    3. Open Command pallet

      1. >SFDX: Authorize an Org

      2. Choose Environment (Sandbox)

      3. Use the default or use the same name used for the folder e.g. struat and press <enter>

    4. Browser will launch test.salesforce.com or the Environment selected above.

      • Enter userName/Password for the environment that you want to use.

      • You may need to Authorize SF to use the CLI - choose “Approve”

    5. You should return to VSCode and see a message that SF has been successfully authorized.

  5. Verify Setup by right clicking:

    1. manifest > package.xml

    2. Choose Retrieve Source in Manifest from Org

    3. The resources defined in the package.xml should be downloaded.