DataCategoryGroup deployment may be destructive

Consider deploying this metadata type manually

Support avatar
Written by Support
Updated over a week ago

Name of the deployment preview error

DataCategoryGroup deployment may be destructive

Sample error message

Deploying category changes from one environment to another may permanently remove some categories and record categorizations. It is recommended to manually create data categories and record associations via the Salesforce UI from ‘Setup’ by entering ‘Data Categories’ in the Quick Find box, then selecting ‘Data Categories’.

When will I see this deployment preview error?

This warning is displayed when you select DataCategoryGroups for deployment.

Deploying DataCategoryGroups through the API will delete any existing records in the target org, which may or may not be what you want. This is expected behavior and is documented in the official Salesforce docs as follows:

Using Metadata API to deploy category changes from one organization to another permanently removes categories and record categorizations that are not specified in your XML file.

Salesforce recommends that you manually create data categories and record associations in an organization from Setup by entering Data Categories in the Quick Find box, then selecting Data Categories rather than deploying changes from a sandbox to a production organization.

How does this affect my deployment?

This is just a warning. Salto will attempt to deploy the element.

How can I fix this error?

There's nothing to fix. Just be aware that you may inadvertently delete existing data categories from the target org. Consider making the changes manually to be on the safe side.

You can learn more about deployment preview errors here.

Did this answer your question?