---
sourceDocument: Xanadu Field Service Management
sourceDocumentLink: https://www.servicenow.com/docs/r/xanadu/field-service-management

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu Field Service Management

ft:clusterId :

    - fsm

bundleId :

    - fsm

workflow :

    - Customer and Industry


---

# State flow cleanup

# State flow cleanup {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

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 a state flow on a table are deleted, the system attempts to delete any unnecessary programming elements that were created on that table, using these criteria:  
{#state-flow-cleanup__table_jv1_zh2_dbc__entry__2}

| 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. |
[Table 1. State Flow Elements Deleted in Cleanup]

{#state-flow-cleanup__table_jv1_zh2_dbc}

