sfdx force:project:create -n <PROJECTNAME> -x
- open project via vsc
- SFDX: Create a Default Scratch Org
a. via vsc: click bottom left button & follow prompts,
OR
b. via command line:sfdx force:org:create -f config/project-scratch-def.json -a <PROJECTNAME> -d 30 -s
npm install --force
create github repo etc
git init
git add .
git commit -m 'init commit'
git remote add origin https://github.com/mateo-navarrete/<PROJECTNAME>.git
git push origin master
to setup custom fields on account object:
connect to mateodx via vsc:
click bottom left button (change default org)
copy paste custom account field package.xml to retrive custom field metadata
sfdx force:mdapi:retrieve -r ./tmp -k ./manifest/package.xml -w 10
connect back to scratch org via vsc:
click bottom left button (change default org)
then open scratch org:
sfdx force:org:open
setup > object manager > account > field & relationships > set history tracking > enable account history > [Account Name,Account Owner,Billing Address, Employees, Ownership, Phone, Website] > save
then
unzip -o ./tmp/unpackaged.zip -d ./tmp
then
sfdx force:mdapi:deploy -d ./tmp/unpackaged -w 10
to pull that data from scratch org:
sfdx force:source:pull
to push that data to scratch org:
sfdx force:source:deploy -p ./force-app/main/default/objects
@TODO: setup custom fields on account object via pulling from github repo directly etc iow git clone etc
Now that you’ve created a Salesforce DX project, what’s next? Here are some documentation resources to get you started.
Do you want to deploy a set of changes, or create a self-contained application? Choose a development model.
The sfdx-project.json
file contains useful configuration information for your project. See Salesforce DX Project Configuration in the Salesforce DX Developer Guide for details about this file.