Push SFDX Source to Your Namespaced Scratch Org

In this exercise, you will…

  • Use the CLI to push your SFDX source into your scratch org
  • Use the CLI to open your scratch org

Use the CLI to push your SFDX source into your scratch org

Before you can build your app, you have to get it’s source into a scratch org. While with MDAPI source you have to deploy source to an org, if you’re using SFDX source and a scratch org, you can use a source push.

Execute this command:

sfdx force:source:push
Salesforce DX Command / Flags Description
force:source:push Pushes changed source from your project to a scratch org to keep them in sync.

After executing the above, your terminal should look something like this:

  1. The force:source:push command that you just executed.
  2. A list of the SFDX source files that were pushed to the scratch org.

Use the CLI to open your scratch org

Just like you’ve done several times before, use force:org:open to open your scratch org.

Execute this command:

sfdx force:org:open
Salesforce DX Command / Flags Description
force:org:open Opens an org in your browser.

After executing the above, your terminal should look something like this:

Your default browser should automatically open to Setup Home within the scratch org:

Updated: