Controlling the Delete Button on ServiceNow Forms
- davidyang88
- Mar 21
- 2 min read
Updated: Mar 26

Managing the visibility and functionality of the "Delete" button on ServiceNow forms is essential for maintaining data integrity and aligning with specific business processes. This article addresses how to selectively disable or hide the "Delete" button across different stages of a form, ensuring it does not inadvertently affect other forms within your ServiceNow instance. This guide is helpful for ServiceNow administrators and developers who need to customize form behavior.
Understanding UI Action Overrides:
The core challenge lies in modifying an out-of-the-box UI action without impacting the global functionality. ServiceNow provides a mechanism to override UI actions for specific tables, allowing for targeted customizations.
Step-by-Step Guide to Overriding the Delete Button:
Locate the Global Delete UI Action: Navigate to "System UI" > "UI Actions" and search for the "Delete" UI action.
Override the UI Action: Open the "Delete" UI action and in the "Table" field, enter the name of the specific table for which you want to modify the "Delete" button. Click "Insert and Stay." This action creates a new "Delete" UI action specifically for your chosen table.
Apply Conditional Visibility: Within the newly created table-specific "Delete" UI action, use the "Condition" field to define when the button should be visible or hidden.
For instance, you might use a condition like current.state != 'Closed' to hide the button when the record is in a closed state.
Scoped Application Considerations: If working within a scoped application, you may encounter challenges selecting the table in the global UI action. In such cases, create a new "Delete" UI action directly within your scoped application, copying the necessary fields from the global action.
Hiding the Global Button in Scoped Apps: If you find both the global and scoped "Delete" buttons appearing, override the global "Delete" UI action with a condition that always evaluates to false, effectively hiding it for your scoped table.
Practical Examples:
Incident Management: You might want to prevent users from deleting incidents that have been closed. By using a condition such as current.state != 7 (where 7 represents the closed state), you can hide the "Delete" button on closed incidents.
Catalog Items: You can hide the delete button for specific catalog items by creating a condition that checks the current catalog item using current.sys_id == 'sys_id_of_catalog_item'.
Alternative Solutions:
While overriding UI actions is the recommended approach, you could also consider using client scripts to hide the "Delete" button. However, UI action overrides provide a more server-side and robust solution.
Conclusion:
By overriding the "Delete" UI action, you can effectively control its visibility and functionality on specific ServiceNow forms. This approach ensures that your customizations do not adversely affect other forms within your instance.
Next Steps:
Identify the specific tables where you need to modify the "Delete" button.
Create table-specific "Delete" UI actions and define appropriate conditions.
Test your customizations thoroughly to ensure they function as expected.
If working in scoped applications, ensure you create UI actions within that scope.
Document your changes for future reference and maintenance.