ServiceNow UI Action Interview Questions 2025

What is UI action?

UI actions include the buttons, links, and context menu items on forms and lists.

Configure UI actions to make the UI more interactive, customized, and specific to user activities.

How to override UI Actions for an extended table?

There are two ways to override UI action:

1. Complete the following steps to override a UI action on the Task table for just the Incident table.
- Create a UI action on the Incident table with the same Action name.If the Action name is not defined, use the same Name. Enter a script that is specific to the Incident table.
- Complete the following steps to remove a UI action on the Task table for the Incident table. Navigate to the UI action definition for the Task table. Add the condition current.getRecordClassName() !='incident'.

2. We can override the parent table UI action on the child table via setting the 'Override' field.

Type of UI actions?

Based on the type of script, it could be divided into 3 types:
1. Client Side.
2. Server Side.
3. Client as well as Server Side.

Based on it's position on the form, it could be divided into following types:
1. Button on a form.
2. Context menu item on a form that appears when you open the form context menu or right-click the form header.
3. Related link in a form.
4. Button in the banner on top of a list.
5. Button at the bottom of a list.
6. Context menu item on a list that appears when you open the list context menu or right-click the list header.
7. Menu item for the action choice list at the bottom of a list.
8. Related link at the bottom of a list.

Based on the table, it could be divided into following types:
1. Global UI actions.
2. Table UI action.

How to write both server side and client side code in UI action? OR What is gsftSubmit() method in UI Action?

To write Server and Client side script in UI action, we need to use gsftSubmit method as shown below:

//Client-side 'onclick' function
function runClientCode(){
if( == false){
return false; //Abort submission
}

//Call the UI Action and skip the 'onclick' function
gsftSubmit(null, g_form.getFormElement(), ''); //MUST call the 'Action name' set in this UI Action
}

//Code that runs without 'onclick'
//Ensure call to server-side function with no browser errors
if(typeof window == 'undefined')
runBusRuleCode();

//Server-side function
function runBusRuleCode(){
current. = ;
current.update();
gs.addInfoMessage('You did it!');
action.setRedirectURL(current);
}

For more details, please refer link :Client and Server Code in One UI Action


Prepared and confident for your interview?

Practice makes perfect! Test your skills with our virtual interview practice buddy and ensure you're fully ready for your upcoming interview.

🎯 Start Practicing

User Added Interview Question and Answers

GVK 2025-08-23 05:39:47

Q : Why we use Null in gsftSubmit() In the context of ServiceNow's gsftSubmit() function, using null for the first parameter typically indicates that the notification or confirmation message generated by the UI Action should appear in the global notification container at the top of the page, rather than being attached to a specific HTML element on the form. It's a common and recommended practice for most scenarios, providing a general notification area for the user. Understanding gsftSubmit() gsftSubmit() is used in UI Actions that have both client-side and server-side scripts. It allows you to execute the client-side script first for validation or other client-side logic, and then trigger the server-side code of the same UI Action. The gsftSubmit() Syntax The typical syntax is: gsftSubmit(null, g_form.getFormElement(), "action_name").

0 Helpfuls


Sree 2024-09-18 22:00:37

There is a button on incident form, when I click on that it should redirect to RP and few fields from Incident should be mapped with RP variables Ex: Caller with Requested For Short Description with Short Desc Description with Desc


anonymous 2024-11-26 23:20:46
you need to capture the data in url and pass those in the variables using onLoad catalog client script
0 Helpfuls
0 Helpfuls


Keerthana Arumugam 2024-05-09 05:10:16

which type of script run in both client and server in servicenow


Suri 2024-10-06 04:29:31
Script Includes or REST API calls
0 Helpfuls
Sumit kumar 2024-11-10 11:46:11
UI actions using gsftsubmit
0 Helpfuls
0 Helpfuls


Suresh 2024-03-19 06:21:02

how to restrict UI action do display only in selected views.


Swapnil 2024-06-28 06:39:10
Using UI Action Visibility Related List.
0 Helpfuls
1 Helpfuls


Navdeep Singh 2023-10-24 10:49:15

Hi, I have a question when we use "g_list.getChecked()" it returns the sys_ids of all the selected records but how can I get all the records. I have a requirement that If I don't select any records that means we need all the records. Thanks in advance!


Pradeep 2024-04-11 02:16:08
I don't see any OOb method to retrieve all the records in the list, But this can be achieved by using a GlideAjax call, g_list.getChecked() returns the comma separated sys_ids of the selected records. Here we can use g_list.getQuery() which returns the encoded query of the list filter, then we can pass this to the GlideAjax script include as a parameter, and then in the Script Include we can use this Encoded Query to glide the table, and then return sys_ids of the records back to the client side
3 Helpfuls
2 Helpfuls


Mahi 2023-07-04 20:04:21

How to trigger a UI action from list view to perform its functionality only on the selected records?


Sandhya 2023-07-09 10:58:56
Hi Mahi, In UI action, you can use g_list object. It has method g_list.getChecked() which returns sys_id's of all selected records. Once you get sys_id's of all selected records then you can glide into those records and perform required operation further.
0 Helpfuls
0 Helpfuls


Niru 2023-06-19 21:12:28

What is gsftsubmit in UI action ?


Rakesh 2023-06-21 07:27:23
Hi Niru, With this function, we can write client as well as Server side script in same UI action. More details here : https://servicenowguru.com/system-ui/ui-actions-system-ui/client-server-code-ui-action
0 Helpfuls
Gvk 2025-08-23 05:37:07
In the context of ServiceNow's gsftSubmit() function, using null for the first parameter typically indicates that the notification or confirmation message generated by the UI Action should appear in the global notification container at the top of the page, rather than being attached to a specific HTML element on the form. It's a common and recommended practice for most scenarios, providing a general notification area for the user. Understanding gsftSubmit() gsftSubmit() is used in UI Actions that have both client-side and server-side scripts. It allows you to execute the client-side script first for validation or other client-side logic, and then trigger the server-side code of the same UI Action. The gsftSubmit() Syntax The typical syntax is: gsftSubmit(null, g_form.getFormElement(), "action_name").
0 Helpfuls
1 Helpfuls






🚀 Power Up Your ServiceNow Career

Join a growing community of smart ServiceNow professionals to stay ahead in interviews, sharpen your development skills, and accelerate your career.

Fuel My Passion

Loving the content? Well, of course you are. Here’s your chance to indirectly fuel the chaos that keeps this website running. Your contribution helps keep the wheels turning and allows me to continue pretending to be a responsible adult—while cranking out more content for you. Thanks for supporting my delusional dreams and helping me keep this website alive!


Buy Me a Coffee

Support with UPI

If you prefer making a UPI payment to support the website maintenance cost, scan the QR code below:

UPI QR Code

Comments