Deleting WF Definitions with Existing Records

If I have records that are using a WF Definition that I created, can I delete the WF Definition? Or do I have to go and delete all of those referencing records first?

In order to remove workflow from a table that is already in use, best practice is to:

  1. Deactivate the workflow builder record (rather than delete it). Deactivation allows for future reactivation if needed, as well as ensures that any other metadata objects pointing to the workflow builder record remain valid.
    • The only scenario where it is safe to fully delete a workflow builder record is if that workflow has not yet shipped to downstream environments, so that you are guaranteed to not impact any existing customizations, extensions, subflows, etc that may be dependent on it.
  2. Data Transform all existing records in the table to remove workflow statuses.
1 Like

Thanks! I will keep that best practice in mind. I ran into a scenario where it looked like a previously created WF Definition had been deleted. My question is if that was possible, or if the system would have stopped it (similar to referential integrity).