ServiceNow Interview Questions and Answers – User Shared Q&A (Set 10)
Supritha 2023-11-15 09:10:48
What is the use of the inherit checkbox in service catalog?
Jyothsnavi 2024-01-24 22:42:10
To allow tables to inherit a client script, the inherit checkbox must be set.
0 Helpfuls
Rajeev 2024-09-13 08:51:22
There is no Inherit checkbox directly in the Service Catalog for catalog items
0 Helpfuls
0 Helpfuls
Mounika 2023-11-16 06:58:34
how to call an event through business rule?
Anonymous 2023-11-17 09:16:04
gs.eventQueue('event name',current,parm1,parm2);
2 Helpfuls
0 Helpfuls
Supritha 2023-11-16 07:00:14
Explain one of the UI policy that you have created? Why used UI policy, why not Client script or ACL(if you are making field read only)? Was there any other way to achieve the same requirement?
My thoughts on the above question would be: If we want to perform different operation a single filed using a UI Policy it would be difficult, as UI policies do not allow more than one operation on a specific field. Say there is a scenario where if certain conditions are met, then I make the field mandatory or visible, and when they do not match I would make it non mandatory or hide using reverse if False. Now say I have another situation which is not exactly same as per my conditions on the UI policy also not completely contraditing and I would only want to make the field mandatory and no actions for visibility, I will not be able to achieve this via UI policy and would need to use a client script, since UI policies will not permit multiple conditions to run on the same field.
There are no actions that can be achieved via UI Policy and not via client scripts, but we ight have to make our selections based on the requirement. UI policy are no code to low code client executions which reduces load time and easy to use, but if we have a dependency on the previous object value or involves more logic we will have to go with client scripts.
The only case I can think of the reason where we cannot use an ACL and need to use a UI policy or client script is when we are applying restrictions on catalog forms.
Prajakta 2024-06-22 04:11:02
Sure, I can explain a UI policy I've created and discuss why UI policy was chosen over other methods like Client script or ACL.
Example UI Policy: Making a Field Read-Only Based on User Role
Requirement: In a ServiceNow application, users with the role 'IT Support' should not be able to edit the 'Assigned To' field on an incident record once it has been assigned.
Implementation using UI Policy:
UI Policy Definition:
Create a UI policy named "Read-only Assigned To for IT Support".
Condition: When the user has the 'IT Support' role AND the incident state is not 'New'.
Action: Set the 'Read-only' property of the 'Assigned To' field to true.
Why Use UI Policy:
Simplicity: UI policies are easy to configure through the ServiceNow UI without needing scripting knowledge.
User-Friendly: Changes made by UI policies are immediate and visible to users as they interact with forms.
Performance: UI policies execute on the client side, reducing server load compared to ACLs which execute server-side.
Why Not Client Script or ACL in This Case:
Client Script: While client scripts could achieve the same functionality by setting field properties, UI policies are simpler for this straightforward requirement.
ACL (Access Control List): ACLs are generally used for security and data access rules rather than field-level behaviors like making fields read-only based on conditions.
Alternative Approach:
Client Script: If additional logic were needed beyond field properties (e.g., showing a message or performing calculations), a client script might be more appropriate.
ACL: If the requirement involved restricting access to certain records based on roles, ACLs would be essential. However, for making fields read-only conditionally, UI policies are often the best fit due to their simplicity and direct applicability.
In conclusion, UI policies were chosen in this scenario for their simplicity and direct capability to make fields read-only based on user role and record state conditions. While client scripts and ACLs have their uses, UI policies provided the most straightforward solution for this particular field behavior requirement in ServiceNow.
1 Helpfuls
0 Helpfuls
Tejashree 2023-11-17 03:35:12
what is Rule base and How to used it
Pradeep 2024-05-10 03:12:54
By using rulebase we can add the catalog items to a order guide.
0 Helpfuls
0 Helpfuls
Anu 2023-11-24 18:17:33
What kind of things you do in events, scheduled jobs and email notification
0 Helpfuls
Charan 2023-12-06 20:54:20
I want to know abt gliderecord, glideajax, glideaggregate and script include.
0 Helpfuls
Ajay 2023-12-07 07:22:40
Sample gliderecord syntax to get the P1 incidents
Astik 2023-12-09 15:30:23
var grP1 = new GlideRecord('incident');
grP1.addQuery('priority',1);
grP1.query();
while(grP1.next()){
gs.print(grP1.number);
}
0 Helpfuls
0 Helpfuls
Pratik 2023-12-11 14:08:45
How we can add 51-100 record out of 100 record available in Excel file.
Mohammed Mustafa V 2024-01-17 06:57:25
Select row header 50.
0 Helpfuls
Nishant 2024-05-31 03:56:11
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
// Add your code here
var num = parseInt(source.u_sr_no);
if(num <= 50){
ignore = true;
return;
}
})(source, map, log, target);
0 Helpfuls
0 Helpfuls
Alaya 2023-12-18 20:51:51
I was asked in interview: On the incident form generally assigned to field is dependent on assignment group. What will happen if we remove the assignment group from the form, will assigned to field still be dependent on assignment group or will it show all the users?
Khaleed 2024-01-18 09:34:49
It will show all the users.
0 Helpfuls
Sharath 2024-06-26 06:03:44
It will show all the ITIL users as per the default Use reference qualifier.
0 Helpfuls
Bushra 2024-10-14 23:07:17
Add assignment_group(backend name of group field) in the dependent value of assigned_to field
0 Helpfuls
0 Helpfuls
How we can add 51-100 record out of 100 record available in Excel file.
Abel Tuter 2025-06-06 22:14:13
Create onBefore transform script and add this
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
// Add your code here
if(source.sys_import_row >= 100 ){
error = true;
}
})(source, map, log, target);
1 Helpfuls
1 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: