What is Salesforce

A Handbook for Developers Getting onto Salesforce DX

Back in 2017, Salesforce had become the first of its kind enterprise cloud service provider which crossed the $10 billion mark in terms of revenue. Do people ask what makes Salesforce successful? The answer is that apart from their community backed initiatives and innovative work environment, Salesforce offers a comprehensive CRM (customer relationship management) experience which is easily accessible, very powerful, and largely customizable.

If you have ever attended any Salesforce official event or watched the video, you may have noticed the frequently used phrase as “click, not code.” The key principle of development on the Salesforce platform is this. Salesforce is rightly shifting the role of customization from developers to the administrator itself by making it easier for them to do it with limited coding skills. Infact, you can become a Salesforce Administrator by joining Intellipaat’s Salesforce Certification which will help you clear the Salesforce Administrator ADM 201 Certification.

Salesforce offers various avenues in declarative programming, which is a step-wise process by allowing anyone without any development experience or knowledge to build any complex functionality in just a few clicks.

Some issues regarding “click, not code.”

Even though the declarative programming approach is ideal for those who don’t have any development or coding knowledge, but in reality, it is developers who largely use Salesforce. For those who have knowledge and skills in development, this click to code approach is so frustrating and troublesome. The developers want to do their custom coding, would have to integrate it with the external applications, and also want the option to track the changes made. Even though Salesforce offers some provisions to develop apps traditionally, these solutions are found to be a bit insecure, tedious, and incomplete from the developer point of view.

What is Salesforce

So, during their 2018 Spring release, Salesforce came up with something new to improve the developer experience, which is popularly referred to as DX, and officially Salesforce DX. This is a very powerful toolset by Salesforce, which helps Salesforce to expedite the development process in the custom development environment and allow the users to approach the challenges in agile development methodology and solve many existing issues on the previously existing platform.

Salesforce DX developer guide

Before you start with Salesforce DX, you must first set up the development environment. For this:

  1. First, enable the Developer Hub in the Developer Edition. You may alternatively do it at production org or trial. It is also possible to use the business org if you are an AppExchange partner.
  2. Sign up for Developer Edition org to explore the tooling on the Salesforce Developers.
  3. You may next enable the 2GP, i.e., second-generation packaging in the org build 2GP packages.
  4. If you want to include a team, then you may next add more users to the Dev Hub.
  5. It is important to meet that your machines also meet the basic requirements, which we will discuss below.
  6. If you would like to evaluate the VS code Salesforce Extensions, then you have to install extension pack too.
  7. To understand the development process better, you can download sample projects too from GitHub.

System requirement

For Salesforce DX, the primary operating system requirements are:

  • Windows 7 or higher (64 bit or 32 bit)
  • Mac OS 10.11 or higher
  • Linux / Ubuntu 14.0.4

IDE or Code Editors

Developers can use any random code editors as suggested by Flosum.com. It is also possible to use the VS Code Salesforce Extensions or Visual Studio Code extensions. On using Salesforce Extensions for VS Code, you need to know that many installation commands may not be available on the command palette. If you fail to find a specific command in the VS Code, then try to run it in the integrated terminal.

Version control

As like IDE, you can use any VCS (version control system) for Salesforce DX development. However, the expert recommendation is for using GitHub with which you can also take advantage of the samples available in the GitHub repository.

CLI

You need to consider the fact that Salesforce only supports the latest version of Salesforce CLI and the plugin of Salesforce DX. In order to upgrade the CLI to the latest version, you may run the sfdx update. In fact, the CLI may also check for any updates and install those periodically. However, you may also disable this auto-updating. In order to do this, you may set:

In order to check the CLI version on your machine, you can just run the sfdx version. Just run the salesforcedx plugin core in order to know the installed CLI version.

Scratch Orgs

You need to enable Dev Hub in the org which you created so that you can create scratch org and manage it from the command line itself. These Salesforce orgs are disposable and can also support development as well as testing. Dev Hub is now available in various editions as Developer, Performance, Enterprise, and also Unlimited. Scratch orgs are made available in editions as Developer, Group, Enterprise, and also Professional.

Enabling the Dev Hub in business or production org is fully safe and also will not adversely affect performance. Dev Hub may, however, comprise some objects with the permissions to allow the admins certain level of access which is available to users and org. You may consider the following factors while selecting Developer Edition org.

  • You may create about six scratch orgs per day and can keep maximum of three scratch orgs in active mode.
  • Trial orgs may expire at the given expiry dates.
  • Developer Edition orgs which are kept inactive for 365 days may get deactivated.
  • It is possible to define namespaces in the Developer Edition org, which isn’t set as your Dev Hub.

If you are planning to create different versions or need to run continuous integration, it is ideal to use business or production org as the Dev Hub as these feature a higher scratch org and also higher limits of the package version. The package versions are directly associated with Dev Hub org. You may lose access to the package version too while the trial period expires.

These are a few basic things developers need to know while setting up the development environment at Salesforce DX. There are more tools and packages too for the developers to get used to while using Salesforce DX, which we will discuss in further articles in this series.

Sujain Thomas

Your Thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.