Codementor Events

Fixing issues while Authorising Salesforce org with vscode

Published Jun 12, 2024

We get to a new project and first thing we need to do is to get the access to the resources and setup the development environment.

In this Post, I am going to explain what all things need to be setup before we start working on the Salesforce org.

  1. Install the VSCode, this can be downloaded from the official website and then you can install it Link
  2. Install the required Extensions. Here you need to install bunch of extensions
  • Salesforce ExtensionPack
  • Git lense
  • and list goes on.

  1. Install the Salesforce CLI, there’s a salesforce cli executable need to be installed in the programs section of the windows/mac https://developer.salesforce.com/tools/salesforcecli

  2. Incase of windows we need to install the JDK/JRE, that can be taken up from the url https://developer.salesforce.com/tools/vscode/en/vscode-desktop/java-setup

  3. Post install we need to setup the environment variable. Verify that the path is added automatically, if not then add the PATH variable value as new entry like “C:\Program Files\Java\jre1.8.0_202\bin”

The other path variable that we need to add if you are not able to authenticate the org.

NODE_TLS_REJECT_UNAUTHORIZED = 0

  1. Go to VSCode and press on your keyboard CTRL + SHIFT + P, a command pallet will be launched

post that select the type of org, you may need to use as per your requirement.

After selecting the type of org, then you need to give a alias name of the org that you would like to remember in the vscode.

  1. A browser tab will be launched on chrome/edge browser and you will be routed to the org for login, enter the credentials of the org and click on Allow button to authenticate the org.Note that the for sandbox url should be (test.salesforce.com or your domain url)

for Production or developer org, url should be login.salesforce.com

Cheers ✌️

Discover and read more posts from Sunil Kumar
get started