How do I add a UI action to ServiceNow
Rachel Hunter
Published Apr 14, 2026
Navigate to System Definition > UI Actions.Click New or open an existing record.Define the UI action by completing the fields. You may need to configure the form to see all the fields. … Click Submit or Update. Note: If the UI action is enabled to run on the client side, wrap it in a function.
How do I create a UI action in Agent Workspace +ServiceNow?
In the Workspace tab, select: Workspace Form Button to make the UI action appear on the line of UI actions, or Workspace Form Menu to make it appears as a list item in the menu list. Workspace Form Button to make the UI action appear on the list of UI actions.
Where are UI actions executed in ServiceNow?
UI actions in servicenow can run on server side and client side both, Mostly requirement is of to run UI action on server side.
What is a UI action in ServiceNow?
UI Actions are UI elements that can show up on a form or a list as a button, link, or context menu. When these UI elements are clicked they execute some JavaScript. Most of the time UI Actions are used to perform some server-side update to a record or records.Which function is used to make UI action work on server side ServiceNow?
Onclick function runs on the client side and the rest of the functions that are written executes in the server side.
How do I add a related list to a workspace in Servicenow?
What do you want to do?How do you do it?Add fieldClick the additional actions icon and select Configure > Form Layout.Add related listClick the additional actions icon and select Configure > Related Lists.
How do I call UI page from UI action in Servicenow?
- function popupDispList() {
- var gdw = new GlideDialogWindow(‘UI page name’);
- gdw. setTitle(‘Incidents’);
- gdw. setPreference(‘table’, ‘incident_list’);
- gdw. setPreference(‘sysparm_view’, ‘default’);
- gdw. render();
What is UI script in ServiceNow?
UI scripts provide a way to package client-side JavaScript into a reusable form, similar to how script includes store server-side JavaScript. Administrators can create UI scripts and run them from client scripts and other client-side script objects and from HTML code. UI scripts are not supported for mobile.How do you call UI action from client script in ServiceNow?
- Client Script. function onLoad() { } …
- UI Action. yourFunctionHere(); 2) Write a UI Script.
- UI Script yourFunctionHere. // This will be callable from all client scripts form any table. // If global is not ticked, you must use ScriptLoader API. …
- UI Action. //If global is not ticked on UI Script.
Save saves the record and stays on form, while Insert creates a new record & redirects to list view. Insert and stay creates new record and stays on the form, while Insert creates a new record & redirects to list view.
Article first time published onWhat are UI pages in ServiceNow?
UI pages can be used to create and display forms, dialogs, lists and other UI components. Use UI pages as widgets on dashboards. To find the UI pages, navigate to System UI > UI Pages. This functionality requires a knowledge of HTML or Jelly. You can also create simple AngularJS applications using UI pages.
How do you make a field mandatory in UI action?
Now, in your ‘reject’ UI Action, just add this line: current. u_flag =’true’; Now write another UI Policy, so that when the Flag is set to True, the Comments field turns Mandatory.
What is the difference between UI policy and UI action?
UI Action represents the usage of Buttons,Links,Context menus,Lists etc whereas UI policies define the visibility of the form fields,mandatory fields,read only fields. These are best way to define than writing scripts. We can incorporate conditions in defining the UI policies.
How do I include a script in ServiceNow?
To access script includes, navigate to System Definitions > Script Includes. The name of the script include. If you are defining a class, this must match the name of the class, prototype, and type. If you are using a classless (on-demand) script include, the name must match the function name.
How do I open UI UI action?
You can use the GlideDialogWindow to open a UI page through UI action.
How do you call UI from UI macro?
- make sure the part highlighted in bold is exactly what your macro is named, including proper case, underscores, etc…: <g:macro_invoke macro=”ui macro name” />
- If your ui page is part of a scoped application, make sure the macro was created under the same application.
What is Jelly script in ServiceNow?
In the ServiceNow platform, Apache’s Jelly syntax is used to render forms and UI pages. Jelly is comprised of Java- and XML-based scripting and a transformation engine used to turn XML into executable code. The output is usually HTML and JavaScript code that is used by the browser to render elements on a page.
How do you add related items in Servicenow?
- Click System Definition > Relationships.
- Click New.
- Specify the relationship record fields. Table 1. Relationship record fields. Field. Description. Name. Type the name of the related list. …
- Click Submit.
What is related list in Servicenow?
Related lists appear on forms and show records in tables that have relationships to the current record. Users can view and modify information in related lists like any other list.
How do I add a record to a related list in Servicenow?
- Select or create records in a related list.
- Configure when a related list loads.
- Create a default filter for a related list.
- Configure the edit option.
- Create defined related lists. Add incidents by same caller related list. …
- Add fields to selections in a related list.
- Create a default filter for list selector records.
Are UI actions client side or server side?
UI actions can be configured to run either server side, or client side. It is also possible to configure a UI Action to run some code on the client, and other code on the server. As with most condition fields, the conditions for whether to display the UI Action are evaluated on the server.
How do you call UI action in business rule?
Hi – You can trigger UI action based on the user action. That said the only way to trigger UI action code is to move the script to a business rule script. (Assuming this is a server side code).
How can you send notification using UI action?
- Create an Event.
- Create a Notification as per your requirement and use the created event as the trigger.
- Create an UI action which fires your event with a single line of code ie.,
How do I create a UI script in ServiceNow?
- Login as ServiceNow administrator.
- Type “UI Scripts” in application navigator, under “System UI” you will find the UI Scripts module.
- Click on UI Script and then click on new button.
Can I use UI script in service portal?
Hi , Actually you can use UI scripts in Service portal. it is a indirect process. … Create UI script.
What is UI macro in ServiceNow?
UI macros are discrete scripted components administrators can add to the user interface. UI macros are typically controls that provide inputs or information not provided by existing field types. By default, the system provides UI macros for a variety of user interface elements such as: All formatters.
What does insert do in ServiceNow?
Creates a new record for the table targeted in the URL.
How do I secure my UI page in Servicenow?
- In the application navigator filter, type sys_public. list .
- Click New.
- In the sys_public table, create a record with the following values. Field. …
- Click Save. By setting active to true, the page is public, so anyone visiting <instance_name>/sp or <instance_name>/$sp.do can access the page.
What is the use of gsftSubmit in Servicenow?
gsftSubmit() triggers the UI Action which is specified in the 3rd parameter, which is the action name/element id. It is mostly used in UI actions that have a client side and a server side script.
How do I create a Servicenow page?
- Navigate to the Homepage Admin > Pages.
- Click New.
- Complete the form. Table 1. …
- Right-click the header and select Save.
- Click the Edit Homepage related link to see the homepage.
- Add content as needed.
How do I add a button to an incident form in Servicenow?
Search UI action in application navigator ->click new button->fill the form as per your requirement->submit.