What This Table Is
The sys_ui_action table stores UI Action records that define form buttons, related links, and context menu items throughout the ServiceNow platform. Each record specifies where the action appears, what conditions control its visibility, and what script executes when users interact with it. UI Actions are the primary mechanism for adding custom functionality to forms, lists, and context menus.
Owned by the Development module, UI Actions support the entire custom application development process. They enable developers to extend standard ServiceNow forms with business-specific functionality, integrate with external systems, and provide shortcuts for common operations. UI Actions can execute client-side JavaScript for immediate user feedback or server-side scripts for data manipulation and business logic.
The sys_ui_action table is a standalone table that doesn't extend other tables. However, it has strong relationships with sys_db_object (through the table field) and sys_ui_view (through the view field). UI Actions can be global or table-specific, appearing on forms, lists, or both depending on configuration.
Large enterprises typically have 500-2000 UI Action records, with the majority being out-of-box platform actions. Custom UI Actions rarely cause performance issues since they're loaded on-demand per form or list. However, complex condition scripts or poorly written client-side code can impact form load times and user experience.
When You'll Script Against This Table
Developers primarily interact with this table through Script Includes when dynamically creating or modifying UI Actions, Business Rules when reacting to UI Action changes, and scheduled jobs when performing bulk updates to action configurations. Client Scripts occasionally query UI Actions to determine which buttons are available, though direct DOM manipulation is often preferred for client-side button management.
Access to sys_ui_action requires the admin role or a custom role with access to the Application Development scope. UI Actions themselves respect ACLs and role requirements defined in their configuration, but the underlying table requires elevated permissions to modify programmatically.
- Creating dynamic form buttons based on record state or user roles
- Disabling or hiding actions based on business rules or approval states
- Bulk updating action visibility across multiple tables during application deployment
- Querying which actions are available for audit or compliance reporting
- Creating approval workflow buttons that appear only at specific workflow stages
- Implementing table-specific integrations that require custom form buttons
- Migrating UI Actions between instances while preserving dependencies and conditions
Table Gotchas
UI Actions with client=true execute immediately when clicked, before any form submission. Server-side actions (client=false) only run after the form submits successfully, making them unsuitable for form validation or immediate user feedback.
The condition field accepts server-side JavaScript but executes in a limited context. You cannot access client-side variables like g_form or g_user from condition scripts. Use role-based security or field value conditions instead of complex JavaScript when possible.
- The
orderfield controls button sequence but only within the same action type (form_button,list_banner_button, etc.). Mixed action types follow ServiceNow's internal ordering rules regardless of your order values. - Form context UI Actions inherit the
currentGlideRecord automatically in server-side scripts, but list context actions do not. Always verify the execution context before accessingcurrentvariables in your action scripts. - The
scriptfield has a 8000 character limit. Large scripts should be moved to Script Includes and called from the UI Action to avoid truncation and improve maintainability.
UI Actions with show_insert=false but form_style=true will still appear on new record forms if no other UI Actions exist for that table. ServiceNow always shows at least one submit mechanism on forms.
- Role-based conditions in UI Actions are case-sensitive and must match exactly. The role
adminis different fromAdminin condition evaluations. - Performance trap: condition scripts execute every time the form loads or refreshes. Expensive operations like web service calls or complex database queries in conditions will degrade user experience significantly.
Enjoying this? Get one deep-dive per week.
Join 1,000+ ServiceNow pros — scripts, GlideRecord patterns, Flow Designer techniques, and career moves. Free.
Related Tables
The sys_db_object table is the primary relationship for UI Actions, linked through the table field. This relationship determines which tables display specific UI Actions and enables table inheritance for actions. Global UI Actions (where table is empty) appear across all forms, while table-specific actions only appear on their designated tables and extending tables.
The sys_ui_view and sys_user_role tables are frequently joined when building dynamic UI Action queries. View relationships control which form contexts display actions, while role relationships determine user access. Developers often query these three tables together when building role-based navigation or implementing approval workflows that require different buttons for different user types.
The sys_ui_action_role many-to-many relationship table connects UI Actions to specific roles, enabling granular access control. When building complex security models or auditing which users can access specific actions, developers query both sys_ui_action and sys_ui_action_role together to understand the complete access picture.