Press enter to see results or esc to cancel.

What is Dev Hub and Unlocked/Second Generation Managed Packages?

In the previous blog posts we have covered the most of the setup part of Salesforce CLI. In case If you haven’t checked them please refer below.

Before we proceed further with Usage of Salesforce CLI with the Orgs. We need to take care of few things Initially. Salesforce CLI works with both the orgs ( Dev Hub enabled and Dev Hub not enabled (sandboxes,production,developer editions..)).
  1. In case if you want to work with Scratch Orgs, We need to enable “Dev Hub” for the org.
  2. In case if you want to work with Unlocked/Second Generation Managed packages then we need to enable “Enable Unlocked Packages and Second-Generation Managed Packages“.
  3. In case if you want to work with Einstein Features then we need to enable “Enable Einstein Features“.
  4. In case if you want to work with Source Tracking in Developer and Developer Pro Sandboxes then enable “Enable Source Tracking in Developer and Developer Pro Sandboxes (BETA)
NOTE: In some orgs you might see different options but the usage is same. Please go through the options and features it is offering. Once those option are enabled, you can’t revert them.

devhub

devhub

The above picture clarifies the same. Options might be different for various reasons. Please go through the offerings and accordingly enable those features.
Now we have come across these few terms  Scratch Orgs and Unlocked Package what are those?
Scratch Orgs: In simple terms these are short lived fully configurable disposable orgs.
Unlocked Packages: In simple terms up-gradable with the all the features managed packages offers.
Enabling the Dev Hub for the org creates the new objects. These object may change with the releases. You can find them under “/services/data/v48.0/sobjects” endpoint.
  • ScratchOrgInfo
  • ScratchOrgInfoFeed
  • ScratchOrgInfoHistory
  • ScratchOrgInfoShare
With this most of the setup part completed, We can now start working with Salesforce CLI by connecting to the Salesforce Org (either to DevHub enabled or not enabled org).
Thanks for reading 🙂 Feel free to drop a comment in case of any questions/clarifications.