Create a Scratch Org #inSalesforce

Create a Scratch Org #inSalesforce


Prerequisite: VSCODE code is ready for Salesforce and DEVHUB enabled org is there and is connected in VSCODE


Note: For details about this org, refer to the reference link


Open VSCODE:

Ctrl+Shift+P > Create default Scratch Org



If you want to add some features like Einstein etc.

Ctrl+Shift+P > Create a project with Manifest

Once created, click config and update the scratch-def, edition to Enterprise (for Scratch org.), features: add SalesCloudEinstein

Save

Now switch to terminal and paste the following command for scratch org creation

Once it successfully runs, you will see that VSCODE default org is Scratch org, visit this org (command palette - open default org.) and check that Einstein is enabled there since we requested earlier.

sfdx force:org:create -f project-scratch-def.json -a MyScratchOrg --setdefaultusername

like-

sfdx force:org:create -f project-scratch-def.json -a MyScratchOrg --somexample@examplesome.com


Click Ctrl+Shift+P to run any command in that org in vscode



Reference: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_create.htm

Comments