Skip to content

Instantly share code, notes, and snippets.

@mtetlow
Created November 13, 2017 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mtetlow/3e6869852280f3172e42ad766580b9e8 to your computer and use it in GitHub Desktop.
Save mtetlow/3e6869852280f3172e42ad766580b9e8 to your computer and use it in GitHub Desktop.
sfdx df17 migration notes
#TODO: Highlight line where cursor
Look at app:
https://sfdxdf17.na73.visual.force.com/apex/myApp?sfdc.tabName=01r1I000000c3dy
Examine app source
https://github.com/mtetlow/sfdxdf17-demo
###
Link the namespace in the dev hub
Login to the dev hub org
sfdx force:auth:web:login -d -a DevHub
###
Make a new branch on the repo
sfdx force:project:create --projectname sfdxdf17/ --defaultpackagedir myApp
cd into sfdxdf17
sfdx force:mdapi:convert --rootdir src/
rm -rf src/
View results at
https://github.com/mtetlow/sfdxdf17-demo/commit/38a35d01c534986ee108fec08282b7d4257c05c0
###
update the project namespace
sublime sfdx-project.json
define the scratch org
add some test data to your config directory
use sfdx help force:data:tree:export to generate some json
view results at
https://github.com/mtetlow/sfdxdf17-demo/commit/6a676f0226bea7addd47f9f1ba4893f1049b3c4e
We've now reached the end of the conversion process
###
How do we use it?
#Create the scratch org
sfdx force:org:create -f config/project-scratch-def.json -a baseScratchOrg
#Push source to the scratch org
sfdx force:source:push -u baseScratchOrg
#assign the perm set
sfdx force:user:permset:assign -u baseScratchOrg -n My_App_Standard_Permission_Set
#import the test data
sfdx force:data:tree:import -u baseScratchOrg --sobjecttreefiles config/sampleData/sfdxdf17__Thing__c.json
#open the scratch org
sfdx force:org:open -u baseScratchOrg -p /apex/myApp
Look at some scripts:
https://github.com/mtetlow/sfdxdf17-demo/commit/da24d68a3d9697bff9922c2ebbb44f632d8a4872
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment