State flow cleanup

reference brazil Updated Sep 10, 2026 1 min read r_StateFlowCleanup.md
Raw file servicenow.com

The business rules, client scripts, and UI actions that the system creates automatically to perform custom transitions exist only while the state flow records that use them are present.

When all the state flows on a table are deleted, the system attempts to delete any unnecessary programming elements that were created on that table, using these criteria:

Element

Deleted When

  • UI action
  • Business rule
  • Dictionary override

The state flow that created it is deleted.

Business rule that processes events triggered by a state flow

All state flows for the table specified that have events configured are deleted.

Client script (onLoad)

All state flows for the table are deleted.

Client script (onChange)

All state flows with field controls are deleted.

Work notes business rule

All state flows with field controls or work notes are deleted

**Parent Topic:**[State flow customization](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/service-management-for-the-enterprise/c_StateFlowCustomization.md)

Related topics

State flow customization

Request states

Request task states

Search documentation
Search document titles and file paths on the brazil branch