- Go to your Sandbox, under Setup search for Dev Hub. Enable Dev Hub and GA. This will allow you to create scratch orgs.
- Install the Salesforce CLI which will allow you to push and pull code and run tests: https://developer.salesforce.com/tools/sfdxcli
- Install VS Code which is now the standard for editing code for Salesforce: https://code.visualstudio.com/download
- Install Java if you do not have it installed yet. The Salesforce Extension Pack requires it. https://www.java.com/en/download/
- Install the Salesforce Extension Pack. In VS Code, click the extensions icon and search for Salesforce Extension Pack.
- Install Lightning Web Components extension in VS Code
If your Salesforce code is in your org and not in source control then you are in Classic Development and not Salesforce DX.
Classic Development Mode (directly interact with an Org)
See these instructions:
https://forcedotcom.github.io/salesforcedx-vscode/articles/user-guide/org-development-model
https://forcedotcom.github.io/salesforcedx-vscode/articles/user-guide/org-development-model
* After creating the project, create these folders under the default folder before doing a Retrieve Source From Org:
- classes
- objects
Salesforce DX Mode (your source is in GitHub or Bitbucket)
Example of cloning a repository, creating a scratch org and pushing the code
git clone https://github.com/dreamhouseapp/dreamhouse-sfdx
cd dreamhouse-sfdx
sfdx force:config:set defaultdevhubusername=your@username.com
sfdx force:org:create -a dreamhouse -s -f config\project-scratch-def.json -d 7
sfdx force:source:push
sfdx force:user:permset:assign -n dreamhouse
sfdx force:org:open -p /lightning/page/home
No comments:
Post a Comment