└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # Salesforce DX Common Commands 2 | 3 | These are SFDX commands I have found I use most often. 4 | 5 | Feel free to suggest additions/changes. 6 | 7 | 8 | ## Setup 9 | Create project `sfdx force:project:create --projectname ` 10 | 11 | Create Scratch Org `sfdx force:org:create --setdefaultusername -a -f config/project-scratch-def.json` 12 | 13 | Open the org `sfdx force:org:open` 14 | 15 | Fetch Metadata `sfdx force:mdapi:retrieve -s -r ./mdapipackage -u -p ` 16 | 17 | Convert Metadata `sfdx force:mdapi:convert --rootdir ./mdapipackage` 18 | 19 | Switch default org `sfdx force:config:set defaultusername=` 20 | 21 | 22 | ## Develop 23 | Push to scratch `sfdx force:source:push -u ` 24 | 25 | Pull from scratch `sfdx force:source:pull -u ` 26 | 27 | Run tests `sfdx force:apex:test:run` 28 | 29 | ## Deploy 30 | Convert to metadata `sfdx force:source:convert -d mdapioutput_dir/` 31 | 32 | Deploy to Org `sfdx force:mdapi:deploy -d mdapioutput_dir/ -u -l RunSpecifiedTests -r ` 33 | 34 | ## Cleanup 35 | Delete scratch org `sfdx force:org:delete -u ` 36 | 37 | ## Settings and Information 38 | Current configuration and settings `sfdx force:config:list` 39 | 40 | List Orgs `sfdx force:org:list --verbose` 41 | --------------------------------------------------------------------------------