Configuring a Salesforce Flow to Delete Recognition Schedules When a Source Record Is Deleted

Warning:

These instructions are intended for users who are experienced at creating Salesforce flows. Refer to the Salesforce Help if you require more information.

If Revenue Management is configured to generate recognition schedules, you can set up a Salesforce flow so that when a source record is deleted, its unrecognized recognition schedule lines are also deleted so that obsolete data does not accumulate. If the source record being deleted has "Complete" recognition schedule lines, those lines are not deleted and the recognition schedule's status is set to "Source Unavailable".

Here is an outline of the flow you will be building. (Click the image to expand it.)

Diagram of Process Flow to Delete Obsolete Schedules

Before You Begin

Before you begin, Revenue Management must be configured to generate recognition schedules. For more information, see Getting Started with Recognition Schedules.

Notes:

The images in these instructions are shown as thumbnails. To expand an image, click it. To close an expanded image, click it again.

Creating the Flow

In these instructions, you must specify your source object. For illustration purposes, these instructions use PSA' s Timecard as the source object.

  1. From Setup, navigate to Flows. Create a new flow of type Record-Triggered Flow.
  2. On the Configure Start window, set:

    Object: Timecard
    Trigger the Flow When: A record is deleted
    Set Entry Conditions: None

    Screenshot of Configuring the Start of a Delete Obsolete Schedules Flow

  3. Click Done.
  4. Click the + symbol between the Start Icon and the End icon, then choose to add an Action element.
  5. Complete the New Action window as follows:

    Action: Delete Recognition Schedules
    Label: Delete Obsolete Timecard Schedules
    API Name: Delete_Obsolete_Timecard_Schedules
    Description: Delete obsolete recognition schedules when timecard is deleted
    Set Input Values: {!$Record.Id}

    Screenshot of Adding the Delete Action to the Flow

  6. Click Done.
  7. Save your flow then click Activate.

Now when you delete a timecard, any unrecognized recognition schedule lines for that timecard are also deleted. This means that obsolete recognition schedules do not accumulate.