ServiceNow Interview Questions and Answers – User Shared Q&A (Set 5)

ann 2023-07-06 19:39:09
Hi, I have asked a question in the interview how to get all variables in task form using script in workflow.

Satyapriya Biswal 2023-08-24 19:01:59
To get the variables from task we use task.variable_name To get the variables from RITM we use current.variables.variable_name
0 Helpfuls
2 Helpfuls


anittha 2023-07-06 19:42:54
I was asked questions when you will decide to use UI policy and data policy I told Ui policy will be used to make changes in client side form and data policy in server side. Interviewer expecting more from me. can anyone answer this Please.

Ram 2023-07-09 12:09:17
Hi Anittha, You are right, Ui Policy is client side and Data Policy is server side validation. But better and clear answer would be. If we would like to apply the validations for the data that is entered by user manually on forms then we will use UI Policy. On the other hand, if we would like to apply validations for the data which is coming via Integration (or not entered manually by end users) then we will use Data Policy.
0 Helpfuls
HRDK 2025-01-27 11:59:51
Imo, the interviewer was expecting this: UI Policy is applied on the data entered via browser, while Data Policy can be applied on all the data entered into the system be it integrations, data source etc
0 Helpfuls
0 Helpfuls


anitha 2023-07-06 19:46:40
Is there any restriction for record producer? will it be applicable for all the tables or any restriction.

Subbu 2023-08-27 22:02:19
There are user criteria that can be defined to restrict the visibility/ access of a record producer.
0 Helpfuls
Gaurav 2023-10-16 07:15:39
I think she meant to say, is there any restriction on which table we can create record producer. I was asked the same but I don't see any answer for this on community
0 Helpfuls
Siva 2024-01-27 09:35:33
You can create a record producer for tables and database views that are in the same scope as the record producer. Also for tables that allow create access from applications in other scopes.
0 Helpfuls
Jenny 2024-06-04 01:02:30
All tables extending 'Task' table
0 Helpfuls
Nacro 2025-02-01 23:53:55
You can create a record producer for any table you want even custom tables, but as per the ServiceNow docs, it is recommended only to create Record producers for tables that are extending from Task table
0 Helpfuls
1 Helpfuls


Kumara swamy 2023-07-07 05:29:01
what are the matcher field what are the setter field

Rohini 2023-09-05 04:32:42
The assignment lookup rule assigns incidents matching the values in the matcher fields (Category, Subcategory, Configuration Item, and Location) to the values in the setter fields (Assignment Group and Assigned To). A valid assignment lookup rule requires at least one matcher field and one setter field.
0 Helpfuls
0 Helpfuls


Suneel Kumar 2023-07-07 06:32:39
How to copy attachments from one record to another? You can use glide function. GlideSysAttachment.copy('from table', current.sys_id, 'to table', dmnd.sys_id);

Navaneetha 2024-11-13 22:29:15
GlideSysAttahment.copy('source tablename', 'source table sys_id', 'target tablename', target table sys_id');
0 Helpfuls
Astik Thombare 2024-12-11 10:48:51
var attachment = new GlideSysAttachment(); var incidentSysID = 'ab1b30031b04ec101363ff37dc4bcbfc'; var incGR = new GlideRecord('incident'); incGR.get(incidentSysID); var copiedAttachments = attachment.copy('incident', incidentSysID, 'problem', incGR.getValue('problem_id')); gs.info('Copied attachments: ' copiedAttachments);
0 Helpfuls
2 Helpfuls


Swetha 2023-07-12 16:28:56
I got a question like how to show different different portals for different user roles.

Sureshmayan 2023-10-30 21:53:12
using Page route map
1 Helpfuls
Pradeep 2024-04-25 01:19:28
By modifying SPEtryPage script include
1 Helpfuls
1 Helpfuls


Satyapriya Biswal 2023-07-15 07:56:31
What are Private functions and what are the uses of it? Can we call a private function from one script include to another script include? Can You share a scenario where we can use private functions?

Ritesh 2023-08-28 06:16:50
Private functions are the functions which can be accessed/called from same script include or child script include, which means it cannot be called in background script or Fix script directly. Private function in SN can be defined by using underscore in the beginning of function name e.g. _getUserData:function(){}
0 Helpfuls
0 Helpfuls


Swetha 2023-07-16 11:33:42
During my interview, I was asked to write a script where I need to return a user's Manager's Manager(Seniormanager). If the field is empty, in that case i have to return his above level manager (Director). Can you help me with the solution code.

Praveen K 2023-09-20 23:58:17
Try using Dot walking and if statement for example - var gr = new GlideRecord('sys_user') gr.addQuery('sys_id','02826bf03710200044e0bfc8bcbe5d88'); gr.query(); if (gr.next()){ gs.print('User Name - ' gr.name) gs.print('Manager Name - ' gr.manager.name) if(gr.manager.manager.name){ gs.print('Managers Manager Name - ' gr.manager.manager.name) //Make sure that managers field is populated in users and managers record } else{ gs.print('Director Details (I dont have director so not displaying)') } }
0 Helpfuls
0 Helpfuls


Vinay 2023-07-18 08:12:18
What are the different types of risks in change management
0 Helpfuls


Priyanka 2023-07-26 22:58:38
Difference between workflow and flow

Pranav 2023-09-05 06:51:24
1. Flow can be scheduled, workflow cannot. 2. Flow have multiple triggers e.g. Inbound email triggers, Application triggers and Rest Triggers, workflow can be triggered based on record creation or update.
2 Helpfuls
5 Helpfuls






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