Salesforce CLI v46 Release Notes

Here are the new and changed features in recent updates of Salesforce CLI and the salesforcedx plug-in.

Run sfdx version to display the version of Salesforce CLI installed on your computer. Run sfdx plugins --core to display the version of the installed salesforcedx plug-in.

Run sfdx update to update both the CLI and the salesforcedx plug-in to the latest available version.

Note: As a beta feature, second-generation managed packages are a preview and aren't part of the "Services" under your master subscription agreement with Salesforce. Use this feature at your sole discretion, and make your purchase decisions only on the basis of generally available products and features. Salesforce doesn't guarantee general availability of this feature within any particular time frame or at all, and we can discontinue them at any time. This feature is for evaluation purposes only, not for production use. It's offered as is and isn't supported, and Salesforce has no liability for any harm or damage arising out of or in connection with it. All restrictions, Salesforce reservation of rights, obligations concerning the Services, and terms for related Non-Salesforce Applications and Content apply equally to your use of this feature. You can provide feedback and suggestions for second-generation managed packages in the Packaging 2 Beta group in the Trailblazer Community.

Click here for the v45 release notes.

46.11.0 (August 22, 2019)

46.10.1 (August 15, 2019)

Install the Pre-Release Version of the CLI

Would you like to get a preview of and start trying out the changes we'll be releasing in October? Install the pre-release version of salesforcedx v47. We'll update the Winter '20 Salesforce CLI release notes (available on August 19, 2019) as we add new and changed commands and parameters.

sfdx plugins:install salesforcedx@pre-release

Make sure that you have the pre-release version.

sfdx plugins --core
salesforcedx 47.0.1-xx

When we officially release v47 on October 12, 2019, uninstall the pre-release, then update the CLI.

sfdx plugins:uninstall salesforcedx
sfdx update

This Week's CLI Changes for 46.10.1

46.9.0 (August 8, 2019)

46.8.0 (August 1, 2019)

We aren't releasing a Salesforce CLI patch this week. (We expect the changes that were previously listed as going out on August 1, 2019, to go out on August 8, 2019.)

46.7.0 (July 25, 2019)

We aren't releasing a Salesforce CLI patch this week.

46.6.0 (July 18, 2019)

46.5.0 (July 11, 2019)

We aren't releasing a Salesforce CLI patch this week.

46.4.0 (July 3, 2019)

46.3.0 (June 27, 2019)

46.2.3 (June 20, 2019)

46.1.5 (June 15, 2019)

Welcome to the first release of version 46 of the salesforcedx plug-in for Salesforce CLI in Summer '19. Here's what's changed.

Installation Notes

We're still working on creating salesforcedx v46 installers. However, you can easily update Salesforce CLI to v46 by running sfdx update or any CLI command. If you are installing Salesforce CLI for the first time, see Install Salesforce CLI to install the CLI for your operating system, then run sfdx update.

Uninstall the Pre-Release Version of the salesforcedx CLI Plug-In

If you installed the pre-release version 46 of the salesforcedx plug-in, uninstall it, then run the update command.

sfdx plugins:uninstall salesforcedx
sfdx update

New Commands

These new commands are available in salesforcedx v46.

force:package:hammertest:list (Pilot): Lists the statuses of running and completed ISV Hammer tests.

force:package:hammertest:report (Pilot): Returns the status of a running ISV Hammer test or the results of a completed hammer test.

force:package:hammertest:run (Pilot): Runs ISV Hammer for the specified package version and subscriber orgs.

force:org:clone (Beta): Clones a sandbox org using values specified in a configuration file or key=value pairs that you specify on the command line. Values specified on the command line override values in the configuration file.

force:org:status (Beta): Reports sandbox org creation status. If the org is ready, authenticates to the org.

force:source:deploy:cancel: Cancels a source deployment. If you include --wait 0, it runs the command asychronously and immediately returns the job ID.

force:source:deploy:report: Checks the status of a source deployment. If you don't supply a job ID, returns the status of the most recent deployment job.

force:source:retrieve:report: Checks the status of a source retrieval. If you don't supply a job ID, returns the status of the most recent retrieval job.

New Parameters

These parameters are new in salesforcedx v46.

force:org:create --type | -t: The type of org to create. If a parameter isn't provided, the default is a scratch org. Use sandbox to create a sandbox org (available as a beta release). Provide sandbox properties (see the SandboxInfo object) as key=value pairs or in a sandbox org definition file. This command references a definition file.

sfdx force:org:create -t sandbox -f config/mysbxconfig.json

Here's what the sandbox org definition JSON file mysbxconfig.json looks like.

  "sandboxName": "MySandbox",
  "licenseType": "Developer"

force:org:create --targetusername | -u: A username for the production org to receive the sandbox request (available as a beta release). If a parameter isn't provided, the defaultusername value is used.

force:package:install --apexcompile | -a: For unlocked packages only, specifies whether to compile all Apex in the org and package (--apexcompile all), or only the Apex in the package (--apexcompile package).

force:source:deploy: We added several parameters to make this command consistent with mdapi:deploy.

--checkonly (-c)Validates the deployed metadata and runs all Apex tests, but prevents the deployment from being saved to the org.
--ignoreerrors (-o)Ignores the deploy errors, and continues with the deploy operation. The default is false. Keep this parameter set to false when deploying to a production org. If set to true, components without errors are deployed, and components with errors are skipped.
--ignorewarnings (-g)If a warning occurs and --ignorewarnings is set to true, the success field in DeployMessage is true. When --ignorewarnings is set to false, success is set to false, and the warning is treated like an error.
--runtests (-r) RUNTESTSLists the Apex classes containing the deployment tests to run. Use this parameter when you set --testlevel to RunSpecifiedTests.
--testlevel (-l) TESTLEVELSpecifies which level of deployment tests to run. Valid values are NoTestRun, RunSpecifiedTests, RunLocalTests, and RunAllTestsInOrg.
--validatedeployrequestid (-q) REQUESTIDDeploys a recently validated set of metadata without the need to rerun the tests.
--verboseIndicates that you want verbose output from the deploy operation.

force:source:retrieve: We added several parameters to make this command consistent with mdapi:retrieve.

--apiversion (-a) APIVERSIONUse to override the default, which is the latest version supported by your CLI plug-in.
--packagenames (-n) PACKAGENAMESA comma-separated list of package names to retrieve. You can use this parameter with other parameters to determine the complete set of metadata to retrieve. You can specify --packagenames as the only scoping parameter, or you can specify both --packagenames and one of the other scoping parameters: --metadata, --sourcepath, or --manifest.
--verboseIndicates that you want verbose output from the retrieve operation.

Changed Parameters

This parameter has changed in salesforcedx v46.

force:package:install --upgradetype | -t: This parameter has a new permissible value: Delete. For package upgrades, this parameter specifies whether to mark all removed components as deprecated (--upgradetype DeprecateOnly), to delete removed components that can be safely deleted and deprecate the others (--upgradetype Mixed), or to delete all removed components, except for custom objects and custom fields, that don't have dependencies (--upgradetype Delete).

Deprecated Parameters

These parameters, which were previously marked as deprecated, were removed in salesforcedx v46.

CommandDeprecated Parameters
force:mdapi:deploy--jobid (-i); Use sfdx force:mdapi:deploy:report -i jobId instead
force:mdapi:deploy--rollbackonerror (-e); Use --ignoreerrors (-o) instead