servicenow scenario based interview questions

Explain what will happen for below scenario :

1. Read Table.none access is provided to Users with Role A,B,C.
2. Read * level access is provided to users with Role B.
3. Read access to priority field is provided to users with Role C.

1. Users with role A won't be able to access any field on table as they pass table level (row level) access but they fail to gain access at * and field level.

2. Users with role B would be able to access all fields on table except Priority field as they have been provided access to table.none and table.* ACL which allows them to access all fields on table but due to restriction on Priority field level ACL, they won't be able to access Priority field.

3. Users with role C would only be able to access Priority field as they are provided access at table level and priority field level but they are not provided access to * ACL therefore they won't be able to access all other fields.

How to show inactive incidents to only ITIL admins and hide for all other users, explain different ways to achieve this?

There are two approaches to implement this scenario :

Method 1 : Using ACL

- Write Table.None ACL on incident table to allow only ITIL admin to see inactive incident as below :


Method 2 : Using Before Query BR

- Write before query BR as shown below, it checks if logged in user has ITIL admin role or not. If user has ITIL admin role then inactive incident will be shown otherwise it will be hidden.

BR Configuration :

BR Script :

Note : Here interviewer tries to understand if your concepts about before query BR and ACLs are crystal clear. They might dig further to ask you about advantages and disadvantages of both methods or which method is more preferable and why, so make sure you know it.

In workflow, We have run script activity which takes around 10 minutes to execute therefore workflow throws an error as 'Transaction Cancelled : Max execution time exceeded'. Why this issue occurs and how to resolve it?

There is transaction Qouta limit set in instance. If any transaction exceeds this limit then it gets cancelled. Generally it is set between 2 to 5mins so if we want our scenario to work then we can increase this value.

However increasing this value is not best practice or may create perormance impact, so rather you can plan to run such heavy long running scripts in background. To do so, we can write such scripts in Script Actions ( Script Actions runs asynchronously in the background ) and call them via workflow run script activity. This way workflow will trigger script in background and move ahead with next activities.

Note : Here Interviewer tries to understand if you know what script action does. They might further ask to explain different scenarios when we are supposed to write script in script actions and when to write it in script includes.

When user opens any incident which has child incident then there should be message saying for assignee group members that "This incident is parent for INCXXXXXX", child incident needs to be resolved before resolving parent incident, how to implement this scenario?

Method 1 : Display BR with On Load Client Script

We can write display BR to check if current incident has any child incident. Store result in scratchpad object and access scratchpad in on load client script to show message accordingly.

Method 2 :On Load Client Script with GlideAjax

We can write onLoad Client SCript with GlideAjax and check if current incident has any child incidents in server side code.

All catalog items under order guide moves to In Progress simulteneausly and those are being worked parallely. I want those items to be worked on sequential order one after other, how to implement this?

We need to Configure a sequence in Process Automation Designer to fulfill items in order guides. To use this functionality, the Order Guide Sequential Fulfillment (com.glideapp.servicecatalog.order_guide_sequencing) plugin must be installed.

For more details, please refer Configure a sequence to fulfill items in order guides

How to show all incidents opened by the same caller as related list on incident records?

This scenario couldn't be achieved by adding related list directly. For such type of requirement we have to create relationships as shown below where custom relation between any two table can be defined.

Relationship to show all incident with same caller as that of current incident :

Once we create above relationships, it will be available in incident related lists to add on the form as shown below :

For more details about relationships click here

How to show specific view while creating new record and different view for existing record?

We can create view rules to change view based on some conditions. Below view rules can be used to show view for new records and existing records on incident table.

This is the View Rule for new records on incident table. For testing purpose 'Cxs_popup' view has been configured for new records. Since 'Created date' is empty for new records so we can use this condition to identify if opened record is new or not:

Result :

This is the View Rule for existing records on incident table. For testing purpose 'ess'(self service) view has been configured for existing records. Since 'Created date' is not empty for existing records so we can use this condition to identify if opened record is existing record: :

Result :

For more details about View Rules click here

How to create single report on multiple tables?

We have Database View functionality in ServiceNow with which we can merge multiple tables into one. So, we can create Database View to merge multiple tables and use the same DB view table to create single report which will have multiple table already.

For more details about DB View click here

How to implement functionality where we can track how much time Incident/Problem/Change was in each state?

We can implement this by writing Metrics on state field on those tables. OOTB ServiceNow has provided this functionality for incident table.

For more details about Metrics and Metric Definitions click here

User Added Interview Question and Answers

Venkat 2024-05-09 09:32:07

If there is a custom field on click of UI action I want to populate count of incident which are from same assignment group and I want to show this field to only admin or ITIL user which modules you will use for this?

0 Helpfuls


Paras Belorkar 2024-05-06 06:35:15

Current logged in user should see only those incidents which are assigned to those groups which he/she is member of. Suppose a user is member of 3 groups. Please explain with the script.

0 Helpfuls


Manal Aquil 2024-02-22 02:04:35

If an organisation is using multiple tools, then how we can synch up data of all the tool .


Priyanka 2024-04-17 00:29:17
By Implementing integration between them
0 Helpfuls
0 Helpfuls


Vishnu Priya 2024-01-10 07:13:06

When user opens any incident which has child incident then there should be message saying for assignee group members that "This incident is parent for INCXXXXXX", child incident needs to be resolved before resolving parent incident, how to implement this scenario?

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
0 Helpfuls


Atharva Chavan 2023-09-23 07:15:58

Use of Jelly Script with an example

2 Helpfuls


Harika 2023-09-07 23:36:06

I need to create a catalog item, in that catalog item I need to generate 10 catalog tasks simultaneously. How can I achieve this?


Rohit 2023-09-20 13:04:31
create a Workflow that will be associated with your catalog item. This workflow should define the logic for generating 10 catalog tasks simultaneously.
0 Helpfuls
0 Helpfuls


Akash 2023-07-11 23:05:10

How to add catalog item fields in workflow


Sushmitha 2023-07-27 20:56:33
current.variables.variable_name
0 Helpfuls
0 Helpfuls


Satyapriya Biswal 2023-04-10 17:41:07

What is the code to execute a scheduled job from a serverside script?


Vardha 2023-04-11 00:41:02
scheduled job is used for server side scripting on a scheduled basis. You do not need to trigger it via some other script. Can you please elaborate what you are trying to achieve here?
0 Helpfuls
Satyapriya Biswal 2023-04-11 03:06:00
Can you please tell me What is the use of Ondemand scheduled job?
0 Helpfuls
Raj 2023-04-11 05:19:55
Hi Satyapriya, Scheduled job can be executed by using gs.executeNow method in server side script, we need to pass scheduled job glide object as parameter as shown below : var grSchedJob = new GlideRecord('sysauto_script'); if(grSchedJob.get('SCHEDULUD_JOB_SYS_ID_HERE')){ gs.executeNow(grSchedJob); } More info can be found on 'https://www.servicenow.com/community/developer- forum/what-is-the-sys-id-gs-executenow-is-returning/m-p/1577551/page/3' Note : The above script can be found on 'Execute Now' UI action which is available on scheduled job form.
1 Helpfuls
Satyapriya Biswal 2023-04-11 05:41:40
Thanks Raj
0 Helpfuls
1 Helpfuls






Comments

Garima Dubey 2023-05-17 08:54:57
Please introduce Scheduled Job-based Questions