RSS

Salesforce – Create Scratch Org using Sfdx CLI

23 Aug

Hi folks,

Here are steps to create Scratch org using SFDX CLI Commands.

  1. Open Visual Studio IDE , go to Terminal and execute the below sfdx CLI commands.

Note: sfdx cli installation should be done.

2. Connect to the DevHub Org using the below command

sfdx force:auth:web:login -d -a devHub

Login with Username / Password

After successfully connected to DevHub Org

3. Create a salesforce project in the VS Code using the below command

Cmd + Shift + P

Create a Project with manifest

Enter the Project name

(OR)

sfdx force:org:create -f config/project-scratch-def.json -a demoorg1

Once the project created successfully, will able to see the below message
Successfully created scratch org: 00D0x0000009IeHEAU, username: test-xifpnzrvzjnt@example.com

4. Verify to which org, you are connected using below command
sfdx force:org:display -u

To see the list of orgs connected, execute the below command
sfdx force:org:list

5. To retrieve the metadata

sfdx force:source:retrieve -u -p force-app

6. Verify the source code folder force-app

References:

Create and Test Our Scratch Org – trailhead

Salesforce Source-Driven Development and Scratch Org

Getting started with Salesforce @SFDX – Udemy

https://dev.to/toadgeek/salesforce-dx-useful-cli-commands-52k

View at Medium.com

Happy Learning!!

Keep watching this space for more updates

Have a nice day 🙂

 
1 Comment

Posted by on August 23, 2019 in Uncategorized

 

One response to “Salesforce – Create Scratch Org using Sfdx CLI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: