Monday, June 15, 2020

Create SFDX Project using CLI


Firstly, Create a local folder in your system Ex: SalesforceLightning Project. Here Name can be of your choice.

  Go To cmd 


Set the Local Folder.
Now, Enter the command for creating the project.
sfdx force:project:create -n CLIUsage -x

So, this is what created in your local system

Now, Let Open this folder in your VS code Editor or any of your coding Editors to run your sfdx project.

This is how it looks with all your folders.

here we should mainly focus on few folders 
  1. Force-app-this contains the metadata of your org like apex class, triggers etc..
  2. manifest - This creates a xml file of your org.
  3. config - this defines your scratch org

This is how you can create a project in your local system, and next authorize your project with your developer,production or sandbox Org.

Now, 

enter the command to authorize your Org
sfdx force:auth:web:login -a CLIcommandlearn -s, -a setalias name of the org and -s setdafultusername. 

immediately it will redirect to your login.salesforce.com url.. and click login. 
Now, your sdfx is  successfully authorized with your org ID.

Next you can perform all task based on your application requirements from CLI itself.