[SalesForce] SFDX VSCode Workspace with Multiple Orgs

I'm working on combining several orgs into a single org. As part of my requirements, until the process is complete, I created some code that syncs up data from the "primary" org back into 3 "legacy" orgs.

This process has me regularly writing, updating and maintaining code in 4 different orgs.

In VSCode with SFDX I created 4 separate projects. The problem is, when I switch from one to the other, there is an time sink from closing down one project an opening another. Futhermore, this forces me to close all of my files for a given project when I would like to have multiple files from multiple orgs open at once.

I created a workspace to try to get all of my projects into a single window where I could work in all my orgs as needed. The problem is that the SFDC CLI seems to only want to work for one of the projects. When trying to deploy or retrieve code from the other 3, it gives me errors.

Is there a way to configure VSCode and the SFDX plugin to allow me to have multiple, functioning, projects in a single workspace?

Best Answer

Reviving this post to point out that this is now possible.

In fact, you only have to Authorize each org once, and they will be available in every future project you create.

So now my (quick) deployment workflow is:

  1. Make package.xml
  2. Set my Dev box as my Default Org (see image)
  3. Right-click: Retrieve Manifest from Org
  4. Set my SIT, UAT, Prod as my Default Org
  5. Right-click: Deploy Manifest

the red lines each represent Orgs I have authorized in this or any other project

Related Topic