Article : UI Actions Issue: Duplicate Action Names Causing Unexpected Behavior
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Overview
In ServiceNow, UI Actions (buttons, links, context menu items) are commonly used to trigger client-side and server-side logic. However, a subtle but critical issue can arise when multiple UI Actions share the same Action name, even if they are configured for different tables or purposes.
This article explains why duplicate Action names can cause UI Actions to not work as expected, especially when clicking a button triggers the wrong client or server functionality.
The Problem
When two or more UI Actions have the same “Action name”, ServiceNow may:
Execute the wrong client-side function
Call an unexpected server-side script
Ignore the intended UI Action entirely
Behave inconsistently across forms, lists, or UI contexts
This typically happens when:
One UI Action uses one kind scripting , Another UI Action uses another scripting and Both share the same Action name, but perform different logic.
Why This Happens
ServiceNow internally relies on the Action name as a key identifier when processing UI Actions. If duplicates exist:
The platform may bind the button click to the first matching Action name
One kind of script functions may override or conflict with another - side execution
The execution order becomes unpredictable, especially in complex forms or customizations
This behavior is not always obvious and can be difficult to debug.
Example Scenario
| Close Incident | close_record | Client | Performs validation and shows a confirmation |
| Close | close_record | Server | Updates state and writes audit logs |
Result:
Clicking the button may:
Skip validation
Call the wrong logic
Execute only part of the intended functionality
Best Practices to Avoid This Issue
✅ Always use unique Action names
Ensure each UI Action has a distinct Action name, even if the label appears the same to users.
✅ Use clear naming conventions
Examples:
close_record_client
close_record_server
approve_request_form
approve_request_list
✅ Avoid reusing Action names across tables
Even if UI Actions are on different tables, duplicates can still cause conflicts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Great share @saichary !
Good overview and very clear and a helpful callout. Duplicate Action names are an easy thing to overlook, and the way you explained the symptoms, root cause, and best practices will definitely save others a lot of troubleshooting time.
Appreciate you taking the time to document and share this my Friend!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
@saichary , This is quite a helpful article. I had faced such issues earlier while dealing with UI actions.
It's always to better to have unique backend names not just for UI actions but for anything we configure in ServiceNow.
Thanks for calling out this issue. This is definitely a good read.
Regards,
Nayan