project convert source-behavior (Beta)
Enable a behavior of your project source files, and then update your Salesforce DX project to implement the behavior.
This feature is a Beta Service. Customers may opt to try such Beta Service in its sole discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided at Agreements and Terms.
Specifically, this command updates the “sourceBehaviorOption” option in the “sfdx-project.json” file and then converts the associated local source files in your project as needed.
For example, run this command with the “–behavior decomposePermissionSetBeta” flag to start decomposing permission sets when you deploy or retrieve them. Decomposing means breaking up the monolithic metadata API format XML file that corresponds to a metadata component into smaller XML files and directories based on its subtypes. Permission sets are not decomposed by default; you must opt-in to start decomposing them by using this command. When the command finishes, your “sfdx-project.json” file is updated to always decompose permission sets, and the existing permission set files in your local package directories are converted into the new decomposed format. You run this command only once for a given behavior change.
For more information about the possible values for the –behavior flag, see the “sourceBehaviorOptions” section in the https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_config.htm topic.
| Flag Name (Long) | Flag Name (Short) | Description |
|---|---|---|
‑‑behavior | ‑b | Type: Value Required Valid Values: decomposeCustomLabelsBeta2, decomposeCustomLabelsBeta, decomposePermissionSetBeta, decomposePermissionSetBeta2, decomposeSharingRulesBeta, decomposeWorkflowBeta, decomposeExternalServiceRegistrationBetaBehavior to enable; the values correspond to the possible values of the “sourceBehaviorOption” option in the “sfdx-project.json” file. |
‑‑dry‑run | N/A | Type: Boolean Display what the command would do, but don’t make any actual changes. |
‑‑flags‑dir | N/A | Type: Value Import flag values from a directory. |
‑‑json | N/A | Type: Boolean Format output as json. |
‑‑preserve‑temp‑dir | N/A | Type: Boolean Don’t delete the metadata API format temporary directory that this command creates. Useful for debugging. |
‑‑target‑org | ‑o | Type: Value Username or alias of the target org. |
Update your Salesforce DX project to decompose custom permission sets:
Display what the command would do, but don’t change any existing files:
Keep the temporary directory that contains the interim metadata API formatted files: