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

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


ann 2023-10-25 22:13:54
on the catalog form below the submit button i want to add reset button which will reset all the values. How to achieve this

vinod singh 2025-02-25 06:28:39
* first create a boolean(true/false) field in the portal setting section of the form. * after creating write UI policy or client script
0 Helpfuls
0 Helpfuls


ann 2023-10-25 22:18:40
when user clicks on new form incident form will open, when user opens a new option that time in the state "cancel" option should be hidden. Once he submits a form "cancel" option should be visible. how to achieve this

snowexpertaastik 2025-09-05 09:59:55
if(g_form.isNewRecord()){ g_form.removeOption('state','8'); }
0 Helpfuls
0 Helpfuls


ann 2023-10-25 22:22:52
when I submit a new request on behalf of "xyz" when xyz opens that form should be editable for "xyz" and other forms should be read only to xyz how can I achieve this.

abdul 2023-11-16 03:22:55
created_by field will store your name and requested_by field will store 'XYZ'. NOw you can USE ACL or combination of Display BR and Client script
1 Helpfuls
Pratiksha 2023-11-24 06:53:23
suppose you create incident on behalf of xyz the you can achieve above requirement in two ways. 1.create write ACL (in script check if logged in user is caller) 2. create display BR and onLoad client script
0 Helpfuls
ISHA 2023-11-28 11:33:26
ACL
0 Helpfuls
Astik Thombare 2023-12-04 07:14:47
Hi @Ann, You can create a new ACL on the incident table with the operation "write" and name it "Incident." Set the conditions to "None" and give the condition that the caller is dynamic. This way, you can achieve the above requirement. Thanks! Astik
2 Helpfuls
satyam jain 2024-03-02 06:10:06
Create write ACL on the table.none and write the script in advance answer=false; var gr=gs.getUserID(); if(current.caller_id==gr){ answer=true; }
0 Helpfuls
0 Helpfuls


susmitha 2023-10-27 03:06:34
I was asked about difference between 200 and 201 status code

Siri 2023-11-16 18:35:44
We can handle based on response status code if we get any status code like below 200 Success Success with response body. 201 Created Success with response body
0 Helpfuls
0 Helpfuls


Nira 2023-10-27 06:36:37
For Incident form, There is ACL which is restricting write access for a role and there is another ACL which allows user with same role to write. Which ACL will work, Will the user with that role able to write or not?

Tony 2023-11-08 02:45:21
Yes, user will be able to write. If user satisfies at least 1 ACL criteria then he will get required access.
2 Helpfuls
Srushti 2025-05-06 00:28:27
If one ACL denies and another allows, denial wins in ServiceNow. The user will not have write access unless there’s an ACL with a more permissive condition that explicitly allows it, and no ACLs deny it.
0 Helpfuls
0 Helpfuls


Urmila Mukati 2023-11-05 01:47:17
Interviewer asked me why we use async BR to trigger notification instead of this we can also trigger notification by it's condition itself. Why we need BR can someone please answer?

Venkat 2024-10-10 04:14:48
Business Rule: With an async Business Rule, you can implement complex logic and conditions that may be difficult or impossible to achieve using the standard notification condition builder. This gives you greater flexibility to decide when and how the notification should be triggered. Example: If the notification depends on a combination of factors or involves checking multiple related records, this can be handled in a Business Rule more easily than using notification conditions alone.
0 Helpfuls
0 Helpfuls


Basavaraj 2023-11-05 11:21:25
Can we select The callers' location's timezone in SLA ?

Gopal 2023-11-16 12:16:20
Yes, user.location
0 Helpfuls
0 Helpfuls


Venky 2023-11-07 00:00:34
What is user criteria, and what is their importance?

Pranathi 2023-11-27 23:06:53
User criteria defines conditions that are evaluated against users to determine which users can access service catalog items.
0 Helpfuls
0 Helpfuls


Supritha 2023-11-15 09:08:43
What is GlideRecordSecure? What is the difference between GlideRecord and GlideRecordSecure: Answer: GlideRecordSecure is a version of GlideRecord that provides an additional layer of security. GlideRecordSecure is designed to prevent unauthorized access to data. GlideRecordSecure enforces access controls and ensures that the user has permission to access the records they are querying. Developers can then use GlideRecordSecure in the same way as GlideRecord to query and manipulate ServiceNow records. GlideRecord queries and manipulates data in the same way as GlideRecordSecure, but GlideRecordSecure provides additional features for securing sensitive data. This ensures that sensitive data cannot be intercepted by unauthorized users as it enforces access controls. Another difference between the two is performance, Because GlideRecordSecure enforces access controls, it may take longer to execute queries than GlideRecord.
4 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