Press enter to see results or esc to cancel.

How to Deploy the changes on Save in Salesforce using VSCode

In this blog post, we will see how to Deploy on save/push on save using the salesforce vs code extension.

Please update the Extension Pack If you haven’t already.

Step by Step guide setup:

  1. Go to:File > preferences > setting > Salesforce feature Previews
  2. Search with this text “salesforcedx-vscode-core.push-or-deploy-on-save”
  3. Enable this checkbox both in User Tab and Workspace Tab.
  4. Restart Your VSCode. You are all set, Next time when you save any code it will auto-deploy to the destination org.

salesforcedx-vscode-core.push-or-deploy-on-save

In the case of scratch orgs, this setting acts as SFDX: Push Source to Default Scratch Org. Whereas for normal orgs this setting acts as SFDX: Deploy Source to Org.

Reference: https://developer.salesforce.com/tools/vscode/en/user-guide/deploy-on-save/