Salesforce Environments – Salesforce Developer Experience (DX) – Salesforce Certified Platform Developer I Study Guide

10.1 Salesforce Environments

Developer Pro Sandbox

A Developer Pro Sandbox is a dedicated environment for individual developers or small teams. It provides a separate space for development and testing, allowing developers to work independently without affecting other developers’ work. It is typically used for individual development and testing tasks, such as building new features, debugging code, and experimenting with configurations.

Production

The production environment is the live instance of your Salesforce org that is used by your end users. This is where your business processes run, and it contains your actual customer data. Deployments to the production environment should be carefully planned and tested in sandboxes before being promoted to production. It is important to ensure that the changes made in sandboxes do not negatively impact the functionality and stability of your production org.

Once your code has been thoroughly tested in the pre-deployment sandbox, you can use change sets to move metadata from the sandbox environment to the production org.

Change Sets is a Salesforce feature that allows you to deploy metadata changes from one Salesforce org to another. But a deployment connection is required between two Salesforce orgs to send change sets from one org to another. Change sets in Salesforce are primarily used to move customizations and configurations between related sandboxes and production orgs. Change sets cannot be sent between orgs that are not affiliated with a production org.

For example, you can use change sets to move changes from a sandbox to a production org, or between two sandboxes that are created from the same production org.

Dev Hub

Dev Hub is a feature in Salesforce that allows you to create and manage scratch orgs. It provides a centralized hub for managing your development environments and allows you to create and delete scratch orgs as needed. Scratch orgs are temporary, disposable orgs that can be used for development and testing purposes. They are typically used for short-term development projects, feature development, and automated testing.

A Scratch Org is a disposable, configurable, and source-driven Salesforce org that can be created and used for a specific development or testing task. It is typically used for short-term development projects, feature development, and automated testing.

To create a new Scratch Org go to Setup ➤ Type “Dev Hub” in the search field on the left menu.

10.2  Visual Studio Code and Salesforce CLI

Visual Studio Code (VS Code) is a lightweight and highly customizable source code editor developed by Microsoft. It is widely used by developers for various programming languages, and it supports a variety of extensions that enhance its functionality.

The Salesforce CLI is a command-line interface that allows developers to manage their Salesforce orgs and metadata from the terminal. It provides a set of commands for creating and managing Salesforce projects, deploying and retrieving metadata, running tests, and more.

The Salesforce Extensions for Visual Studio Code is a plugin that provides a set of tools for developing Salesforce applications in Visual Studio Code. It includes features such as code completion, syntax highlighting, debugging, and more. The plugin also integrates with the Salesforce CLI to provide a seamless development experience.

By using Visual Studio Code with Salesforce CLI, developers can have a streamlined development experience, benefit from features like code completion and syntax highlighting, and leverage the power of the Salesforce CLI for managing and deploying Salesforce applications.