When I used Illuminated Cloud (IC), I could deploy the metadata in the workspace to another org by selecting the Deploy All Metadata option from the context menu and select a different org to deploy to from within the IC dialog. How would I do this with the Salesforce Extension for VS Code? Both orgs in question are Trialforce orgs, not Sandbox, QA, Prod orgs.

2 Answers 2


You can deploy to any org using the terminal:

sfdx force:source:deploy -p force-app/ -u username-or-alias

Or you can set the default username (View > Command Palette... > SFDX: Set a Default Org) and then right-click on the file/folder to deploy and choose SFDX: Deploy Source to Org.

  • 2
    To clarify, I needed to deploy six classes and a dozen Lightning components to a different org. What I wound up doing was creating a modified package.xml in the folder that only referenced those members, authenticating to the other org, then right-clicking on the package.xml and deploy that to the other org. Seems like there should be an easier way than this, to deploy select metadata from one org to the another. IC makes this very easy to accomplish. Mar 21, 2019 at 15:16
  • @MichaelSobczak That's not how DX was designed to be used. You're supposed to have different source folders that you can deploy independently. Different IDEs have done different things in the past, but the future really is in unlocked packages with multiple package folders. VS Code extensions are built with this idea in mind. If you're interested, though, you can always write your own VS Code extensions to make whatever flow it is you want to use.
    – sfdcfox
    Mar 21, 2019 at 15:32
  • I guess for my role, I don't use most of what DX is insisting I use, as in github. I do need to learn about DX more. The only reason why I'm using VS Code is my IC license expired, and I did not want to use Dev Console under any circumstances. Mar 21, 2019 at 19:15
  • @MichaelSobczak You don't need github (but I do recommend a repo of some kind, even if just locally). I personally use Mohith's dx code companion which automates deploy on Ctrl-S, saves a bunch of time, but you'll find that typically you'll want to at least set up some shell scripts for common deployment tasks, at least for now.
    – sfdcfox
    Mar 21, 2019 at 19:19
  • There is a new option in the extension you can configure do automatically do a deploy on save: medium.com/@idanblich/… Mar 21, 2019 at 19:51

Using VS code you can add as many organizations as you need. Using SFDX you can Authorize these new organizations.

In the down side of the screen you can move from one org to another and just deploy your code to the selected one.

martin larizzate salesforce vscode supports +1 orgs

Hope to be usefull!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .