This guide helps Salesforce developers who are new to Visual Studio Code go from zero to a deployed app using Salesforce Extensions for VS Code and Salesforce CLI.
There are two types of developer processes or models supported in Salesforce Extensions for VS Code and Salesforce CLI. These models are explained below. Each model offers pros and cons and is fully supported.
The package development model allows you to create self-contained applications or libraries that are deployed to your org as a single package. These packages are typically developed against source-tracked orgs called scratch orgs. This development model is geared toward a more modern type of software development process that uses org source tracking, source control, and continuous integration and deployment.
If you are starting a new project, we recommend that you consider the package development model. To start developing with this model in Visual Studio Code, see Package Development Model with VS Code. For details about the model, see the Package Development Model Trailhead module.
If you are developing against scratch orgs, use the command SFDX: Create Project
(VS Code) or sfdx force:project:create
(Salesforce CLI) to create your project. If you used another command, you might want to start over with that command.
When working with source-tracked orgs, use the commands SFDX: Push Source to Org
(VS Code) or sfdx force:source:push
(Salesforce CLI) and SFDX: Pull Source from Org
(VS Code) or sfdx force:source:pull
(Salesforce CLI). Do not use the Retrieve
and Deploy
commands with scratch orgs.
The org development model allows you to connect directly to a non-source-tracked org (sandbox, Developer Edition (DE) org, Trailhead Playground, or even a production org) to retrieve and deploy code directly. This model is similar to the type of development you have done in the past using tools such as Force.com IDE or MavensMate.
To start developing with this model in Visual Studio Code, see Org Development Model with VS Code. For details about the model, see the Org Development Model Trailhead module.
If you are developing against non-source-tracked orgs, use the command SFDX: Create Project with Manifest
(VS Code) or sfdx force:project:create --manifest
(Salesforce CLI) to create your project. If you used another command, you might want to start over with this command to create a Salesforce DX project.
When working with non-source-tracked orgs, use the commands SFDX: Deploy Source to Org
(VS Code) or sfdx force:source:deploy
(Salesforce CLI) and SFDX: Retrieve Source from Org
(VS Code) or sfdx force:source:retrieve
(Salesforce CLI). The Push
and Pull
commands work only on orgs with source tracking (scratch orgs).
For details about developing against scratch orgs, see the Package Development Model module on Trailhead or Package Development Model with VS Code.
For details about developing against orgs that don’t have source tracking, see the Org Development Model module on Trailhead or Org Development Model with VS Code.
In order to deploy this repository to a production organization we have provided the following package: [https://login.salesforce.com/packaging/installPackage.apexp?p0=04t3X000003Oz6L] Password: test1234
- This package does not contain the RepoExplorer solution of Jonathan Wiesel
This Repository contain part of repository called "RepoExplorer" of Jonathan Wiesel, which has the following Copyright.
URL: [https://github.com/jonathanwiesel/RepoExplorer]
Copyright 2018 Jonathan Wiesel
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.