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.
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 :
![](images/show_inactive_incident_acl.PNG)
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 :
![](images/show_active_incident_before_query_confin.PNG)
BR Script :
![](images/show_active_incident_before_query_script.PNG)
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.
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.
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.
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
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 :
![](images/relationships_incident_with_same_caller.PNG)
Once we create above relationships, it will be available in incident related lists to add on the form as shown below :
![](images/related_list_incident_with_same_caller.PNG)
![](images/relationships_related_list.PNG)
For more details about relationships
click here
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:
![](images/new_record_view_rule.PNG)
Result :
![](images/new_record_view_result.PNG)
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: :
![](images/view_rule_for_existing_record.PNG)
Result :
![](images/view_rule_for_existing_record_result.PNG)
For more details about View Rules
click here
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
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
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