Skip to content

Instantly share code, notes, and snippets.

@okram999
Last active November 19, 2017 19:39
Show Gist options
  • Save okram999/2a19ecb8ee1e6e6c93fd16b73630e662 to your computer and use it in GitHub Desktop.
Save okram999/2a19ecb8ee1e6e6c93fd16b73630e662 to your computer and use it in GitHub Desktop.
salesforce dx
#login and cache credentials
sfdx force:auth:web:login
#Adding the -d flag sets this org as the default Developer Hub. Use the -a to set an alias for the org
#(something catchy like DevHub). An alias is much easier to remember than the unique Dev Hub username
sfdx force:auth:web:login -d -a DevHub
### Only indicate the -d flag for your Dev Hub.
#Log In to Sandboxes
sfdx force:auth:web:login -r https://test.salesforce.com -a dev
sfdx force:org:open -u dev #login to dev sandbox
sfdx force:auth:web:login -r https://test.salesforce.com -a fte2
sfdx force:org:open -u fte2 #login to fte2 sandbox
# create scratch org using the config file in the project
$ sfdx force:org:create -s -f config/project-scratch-def.json -a "default scratch org"
#open the scratch org created
$ sfdx force:org:open
# push the metadata files from local
$ sfdx force:source:push
# assign a permset
$ sfdx force:user:permset:assign -n Dreamhouse
#load data
$ sfdx force:data:tree:import --plan data/sample-data-plan.json
$ sfdx force:org:open
#list all the alias
sfdx force:alias:list
# delete scratch org using alias
sfdx force:org:delete -p -u GeoTestOrg # -p will not prompt for deletion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment