nerdexam
Salesforce

PDI · Question #202

Universal Containers has developed custom Apex code and Lightning Components in a Sandbox environment. They need to deploy the code and associated configurations to the Production environment. What…

The correct answer is D. Use Salesforce CLI to deploy the Apex code and Lightning Components. The recommended process for deploying custom Apex code and Lightning Components from a Sandbox to Production is to use the Salesforce CLI, aligning with modern source-driven development practices.

Submitted by viktor_hu· Apr 18, 2026Testing, Debugging, and Deployment

Question

Universal Containers has developed custom Apex code and Lightning Components in a Sandbox environment. They need to deploy the code and associated configurations to the Production environment. What is the recommended process for deploying the code and configurations to Production?

Options

  • AUse a change set to deploy the Apex code and Lightning Components.
  • BUse the Force.com IDE to deploy the Apex code and Lightning Components.
  • CUse the Ant Migration Tool to deploy the Apex code and Lightning Components.
  • DUse Salesforce CLI to deploy the Apex code and Lightning Components.

How the community answered

(34 responses)
  • A
    3% (1)
  • B
    6% (2)
  • C
    3% (1)
  • D
    88% (30)

Why each option

The recommended process for deploying custom Apex code and Lightning Components from a Sandbox to Production is to use the Salesforce CLI, aligning with modern source-driven development practices.

AUse a change set to deploy the Apex code and Lightning Components.

Change sets are a declarative tool suitable for simpler deployments between closely related orgs, but they are generally not recommended for complex deployments involving source control or continuous integration, which is implied by 'recommended process' for custom code.

BUse the Force.com IDE to deploy the Apex code and Lightning Components.

The Force.com IDE is an older, Eclipse-based development tool that has been superseded by modern IDEs like VSCode with Salesforce Extensions and the Salesforce CLI.

CUse the Ant Migration Tool to deploy the Apex code and Lightning Components.

The Ant Migration Tool, while functional for metadata deployments, is an older, XML-based tool that is less flexible and feature-rich than the modern Salesforce CLI for managing and deploying Salesforce projects.

DUse Salesforce CLI to deploy the Apex code and Lightning Components.Correct

Salesforce CLI (SFDX CLI) is the recommended and modern tool for source-driven development and deploying metadata, including Apex code and Lightning Components, from a sandbox to production environments, offering robust command-line capabilities for various development and deployment tasks.

Concept tested: Recommended deployment tools for Salesforce DX

Source: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_intro.htm

Topics

#Deployment#Salesforce CLI#Metadata Deployment#Development Lifecycle

Community Discussion

No community discussion yet for this question.

Full PDI Practice