For the complete documentation index, see llms.txt. This page is also available as Markdown.

Adding Pre and Post Destructive Changes to a Branch

Use destructive changes to remove Salesforce metadata components during deployment. You can configure them as Pre or Post to control when the deletions happen.

Overview

Destructive changes allow you to delete metadata from a Salesforce org as part of a deployment. For example, you may want to remove unused fields, classes, or components. In Flosum DevOps, destructive changes can be applied in two ways:

  • Pre-destructive changes: deletions occur before the main deployment.

  • Post-destructive changes: deletions occur after the main deployment.

Deployment

Best Practices

  • Use pre-destructive changes to remove metadata that might conflict with the new deployment.

  • Use post-destructive changes to clean up after the new components are deployed.

  • Always validate deployments with destructive changes to ensure no critical metadata is deleted by mistake.

Since the steps for adding a pre-destructive change and a post-destructive change are the same, this article shows you how to add a pre-destructive change.

Adding Destructive Changes

1

Select a Branch

  1. Click Branches from the left sidebar menu.

  2. Select a branch from the list.

2

Add Destructive Changes

  1. On the Components tab, click the Destructive Changes table selector.

  2. Click + Add Pre Change.

  3. Select the Source Type:

    1. Organization: Lets you choose components from a Salesforce org to include in destructive changes.

    2. Branch: Lets you choose components from a branch to include in destructive changes.

  4. Click Continue.

  5. Click Select for the Organization or Branch from which you want to add components.

  6. Click Next.

3

Select Components

  1. Search, filter, and sort to find the components to add to the destructive changes.

  2. Click Select for each component to add.

  3. Click + Add once all components are selected.

  4. The components you added are listed in the Destructive Changes table. The Deploy Type column shows whether each change is Pre or Post.

Managing Destructive Changes

After adding a component to the Destructive Changes table, you can manage it by changing its deployment type or removing it completely.

1

Change Deployment Type

You can switch the deployment type between Pre and Post. The Change to Post/Pre option depends on the Deploy Type the destructive change is currently set to.

  1. Click the Three Dots menu for the destructive change you want to update.

  2. Click Change to Post/Pre.

  3. The destructive change will immediately switch Deploy Types.

2

Delete Destructive Change

  1. Click the Three Dots menu for the destructive change you want to delete.

  2. Click Delete.

  3. Click Yes, delete in the Delete Component confirmation dialog.

Deleting the destructive change component does not delete the component from the branch; it only removes it from the destructive changes.

Last updated

Was this helpful?