|
| 1 | +# summary |
| 2 | + |
| 3 | +Enable a behavior of your project source files, and then update your Salesforce DX project to implement the behavior. |
| 4 | + |
| 5 | +# description |
| 6 | + |
| 7 | +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. |
| 8 | + |
| 9 | +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. |
| 10 | + |
| 11 | +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. |
| 12 | + |
| 13 | +# flags.behavior.summary |
| 14 | + |
| 15 | +Behavior to enable; the values correspond to the possible values of the "sourceBehaviorOption" option in the "sfdx-project.json" file. |
| 16 | + |
| 17 | +# examples |
| 18 | + |
| 19 | +- Update your Salesforce DX project to decompose custom labels: |
| 20 | + |
| 21 | + <%= config.bin %> <%= command.id %> --behavior decomposeCustomLabelsBeta |
| 22 | + |
| 23 | +- Display what the command would do, but don't change any existing files: |
| 24 | + |
| 25 | + <%= config.bin %> <%= command.id %> --behavior decomposeCustomLabelsBeta --dry-run |
| 26 | + |
| 27 | +- Keep the temporary directory that contains the interim metadata API formatted files: |
| 28 | + |
| 29 | + <%= config.bin %> <%= command.id %> --behavior decomposeCustomLabelsBeta --dry-run --preserve-temp-dir |
| 30 | + |
| 31 | +# flags.dry-run.summary |
| 32 | + |
| 33 | +Display what the command would do, but don't make any actual changes. |
| 34 | + |
| 35 | +# flags.dry-run.description |
| 36 | + |
| 37 | +Doesn't modify the existing files in your project, including the "sfdx-project.json" file. Instead, the command lists the files that would be deleted, explains the modifications to the "sfdx-project.json" file, and outputs the resulting modifications to a new directory named `DRY-RUN-RESULTS` for review. |
| 38 | + |
| 39 | +# flags.preserve-temp-dir.summary |
| 40 | + |
| 41 | +Don't delete the metadata API format temporary directory that this command creates. Useful for debugging. |
| 42 | + |
| 43 | +# error.trackingNotSupported |
| 44 | + |
| 45 | +Your project has a default org (target-org) that uses source tracking. This operation will cause changes to the local project source files that can't be properly tracked. |
| 46 | + |
| 47 | +# error.trackingNotSupported.actions |
| 48 | + |
| 49 | +- Retrieve any changes or data you need from the org that you haven't already retrieved. |
| 50 | +- Delete the org ("sf org delete scratch" or "sf org delete sandbox"). |
| 51 | +- Run this command again. |
| 52 | +- Create a new org ("sf org create scratch" or "sf org create sandbox") and deploy the modified source. |
| 53 | + |
| 54 | +# error.packageDirectoryNeedsMainDefault |
| 55 | + |
| 56 | +The package directory %s doesn't have a main/default structure. |
| 57 | +This command moves metadata into a main/default structure, but your package directories aren't ready for it. |
| 58 | + |
| 59 | +# error.packageDirectoryNeedsMainDefault.actions |
| 60 | + |
| 61 | +- Update %s to have all its metadata inside a main/default directory structure. |
| 62 | +- Run the command again. |
| 63 | + |
| 64 | +# success.dryRun |
| 65 | + |
| 66 | +Files were created in %s outside your package directories for you to inspect. |
| 67 | + |
| 68 | +# error.noTargetTypes |
| 69 | + |
| 70 | +The project doesn't contain any package directories with metadata that matches the specified behavior %s. |
0 commit comments