SFDX Projects and Scratch Orgs

vladimir-proskurovskiy-736130-unsplash-1080x675

In my last post, I demonstrated how to authorise a dev hub and create an alias for it. Also, how to see a list of the orgs to which you are connected via CLI. In this post I am gonna demonstrate how to create an SFDX project and create a scratch org from it and also how to synchronise them both. I will also demonstrate how to push all these changes to Git (Git configuration is beyond the scope of this post but you can always google it). Lets get started!

How to create an SFDX project:

Before we even explore how to create a project, we need to understand why do we need to create a project. I am sure you guys must have asked this to yourselves. The simple reason behind this is the package model approach. Isolating features into projects helps us release these changes as a package rather than overlapping with other changes and releasing as an org deployment. And also, because projects contain the configuration file which allows us to create scratch orgs. So lets see how to create a project. Using terminal you can fire the following command to create a project.

sfdx force:project:create -n projectname

Here,  -n stands for name of the project. A project can also be created using the SFDX extension for vs code. It is rather easy. Checkout the video to see how.

Leave a reply