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?

  • As far as I'm aware, no, VS Code doesn't yet have an extension like this (maybe someone will write one some day). For now, you'd probably want to use shell scripts. – sfdcfox Mar 15 '19 at 16:40
  • The problem doesn't necessarily seem to be on the VS Code side, it has support for workspaces and multiple projects. It feels more like an SFDX plugin issue. Seems that it just grabs the first project it can find and uses that information as opposed to being able to identify which project a file belongs to. – gNerb Mar 15 '19 at 16:43
  • Actually, it's based on the sfdx-config.json file; that file requires modification to work with different paths, which often makes it impractical. – sfdcfox Mar 15 '19 at 16:45
  • Yea I was reading up on that, it seemed that it was still only meant for a single project though. It's designed to support what ever this "second generation packaging" stuff is. Seems to be super helpful for ISVs and agile minded companies. I am likely to implement it, just doesn't seem related to this issue. – gNerb Mar 15 '19 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.