Salesforce Developer Experience (DX) is a new way to manage and develop apps throughout the app life-cycle. It is a source driven development model. Instead of maintaining various environments to get the latest version of code or metadata, a single centralized source control system (e.g. Git) is maintained.
In addition to supporting source driven development, Salesforce DX also provides a feature known as Unlocked packages. Unlocked packages help you add, edit, and remove metadata in your org in a traceable way. You can apply your source and metadata to multiple orgs, and upgrade your Salesforce apps easier and faster after each release.s
Setup SalesforceDX with Visual Studio
- Download and install Salesforce CLI in your system
- run sfdx version in cmd to verify Salesforce CLI version
- run sfdx plugins –core in cmd to verify the Salesforce CLI plug-in version. To work with Lightning web components, you need Salesforce CLI version 45 or above.
- Download and install Visual Studio Code (VS)
- Navigate to Extensions in left side panel or click Ctrl+Shift+X and install following extensions in VS Code editor.
- Salesforce Extension Pack : This extension pack contains necessary tools to develop Salesforce code in VS editor
- Salesforce CLI Integration : This extension enables Visual Studio Code to use Salesforce CLI to interact with your orgs
- Lightning Web Components : This extension provides you code editor for lightning web components.
- Navigate to Extensions in left side panel or click Ctrl+Shift+X and install following extensions in VS Code editor.
- Salesforce Org Setup
- Login to your Salesforce org and enable My Domain Navigate to Setup🡪Home🡪Company Settings🡪My Domain or in Setup🡪 Home🡪Quick find box look for My Domain.
- Enable Dev Hub for your Salesforce org . Navigate to Setup🡪Home🡪Development 🡪Dev Hub or in Setup🡪 Home🡪Quick find box look for Dev.
Note- Dev Hub can’t be disabled once it is enabled.