Table of Content
- What are Scratch Orgs
- Setting up SalesforceDX
- Authorize Salesforce Instance to be used with SFDX
- Create Scratch Org
- Move code to and from Scratch Org
- List of existing Orgs in SFDX
- Open Salesforce Org from SFDX
- Run Test Classes
- Setup Log Level
- Create Skeleton Workspace
- Generate Password for Scratch Org
- Enable Person Account
- Deploy and Retrieve metadata from Sandbox – Old Source Format
- Deploy and Retrieve metadata from Sandbox – New Source Format
- Set default username or default dev hub
- package.xml to SFDX format
- Sample Bash script to retrieve source code from developer or sandbox and convert to SFDX format
- Change SFDX API version
If we already have Salesforce Metadata API, Force.com IDE and other tools then why do we need one more tool like Salesforce DX ?
In tools like Changeset, Metadata API or Force.com IDE, source of truth is Sandbox. Although we can setup process and continuous integration (CI) to use some source code management (SCM) like Git or SVN. However these kind of setup takes time, expertise and lot of effort.
Salesforce DX not only solves above problem but
- Ability to consider SCM as source of truth
- Use any favorite IDE or any SCM
- Powerful CLI to help minimizing complexity of setting up CI
- Updated Force.com IDE to support Salesforce DX if you are not comfortable with CLI
- and most important, spin off Scratch Orgs within minutes through script to quickly work on POC or package based development
What are scratch Orgs ?
Salesforce DX can be enabled for any Salesforce instance and they are known as Developer Hub. One Developer Hub can have multiple Scratch Orgs. Scratch Orgs are temporary Salesforce org which can be created quickly and metadata can be deployed from SCM. These kind of Orgs can be used by developers to perform quick proof of concept or build and test packages. Once package is build and saved back on SCM, scratch org can be destroyed easily.
Continue reading “Most Frequently used SFDX Commands”