Interview Question
Interview Question
Interview Question
Service now is a cloud based ITSM tool. Which is used to automate your business process
and provides a best service to customer all aspects of IT Services can potentially live in
the Service Now ecosystem of modules, This allows for broad control of how to best
allocate resources and design the process flow of those services.
3) Types of change
Normal change
Its normal change generally when developer want to make some changes, need CAB
approval
Not required any CAB approval before make a change, its pre-approved cause of
frequently doing the same kind of change
Emergency Change
Earlier my client was using BMC remedy tool; then they have decided migrate to Service-
Now, so they have given training me on Service-Now. Initially my career was starts with
just administration part but later I got a chance to working with other areas like in
Service Now Interview Questions
5). Could you please tell me what all you have done in Service-Now?
I am involved in all kind of activities from basic administration to advanced scripting and
customization. I have contributed my work in Incident, Problem, Change, SRM, Service
Catalog and Asset and Configuration Management, Knowledge management, Discovery,
Performance analytics areas. Recently I have started working on service Portal.
6) What is Incident?
Something is broken into your application or un expected interruption in your business
application is called incident
7) What is Problem?
When incidents are occurring similar kind of issues from multiple peoples or same category
we can consider as problem ticket.
Based on ticket trend analysis we can able to create problem ticket Then we can correct order
for that so we can find root cause analysis need to be fixed the issue permanently.
I have also designed the email templates for email notifications, and also triggering the
notifications when the conditions are matched.
Repetitive incidents will be logged as a problem ticket; technically I have done the same
stuff which I have done for the incident management like business rules, client scripts, ui
actions, ui policies, notifications.
10. Please share your experience on change management?
Service Now Interview Questions
I have modified the workflow of change management table so that it can move for cab approvals
as per the requirement, also I have created new workflows for emergency change request.
Business rule is a server-side script that runs when a record is displayed, inserted, deleted,
or when a table is queried. Use business rules to automatically change values in form fields
when the specified conditions are met.
Business rule are excuting from server side scripting that executes whenever a record is
inserted, updated, deleted, displayed or queried. The key thing to keep in mind while
creating a business rule is that when and on what action it has to execute. We have different
operation like
Before
After the user submits the form but before going to perform any action is taken on the
record in the database
After
After the user submits the form and ofter any action is taken on the record in the database
Async
When the scheduler runs the scheduled job is created from the business rule. The
system creates a scheduled job from the business rule after user submits the forms and
after any action is taken on the record in the database
Display business-rules:
Display business rules are processed when a user requests a record form.
The data is read from the database, display rules are executed, and the form is presented to
the user.
1. The current object is available and represents the record retrieved from the database.
2. Any field changes are temporary since they are not yet submitted to the database.
To the client,
3. The form values appear to be the values from the database; there is no indication that
the values were modified from a display rule. This is a similar concept to calculated
fields.
4. The primary objective of display rules is to use a shared scratchpad
object, g_scratchpad, which is also sent to the client as part of the form.
5. This can be useful when you need to build client scripts that require server data
that is not typically part of the record being displayed.
6. In most cases, this would require a client script making a call back to the server.
// If you want the client to have access to record fields not being displayed on the
form g_scratchpad.created_by = current.sys_created_by;
// These are simple examples, in most cases you'll probably perform some other
// queries to test or get data
To access the form scratchpad data from a client script:
Service Now Interview Questions
In a before business rule script, you can cancel or abort the current database action.
In a before business-rule script, you can cancel or abort the current database action using the
current.setAbortAction = true method. For example, if the before business rule is
executed during an insert action, and you have a condition in the script that
calls current.setAbortAction(true), the new record stored in current is not created in the
database.
Script
We can use a query business rule that will be executes before a database query is made.
Use this query business rule to prevent users from accessing certain records. Consider the
following example from a default business rule that limits access to incident records.
Script
18) This sample business rule restricts the writing of the name field in
the sys_dictionary file when the entry exists:
// the element name cannot be written unless this is a new record (not yet in database)
function sys_dictionary_nameCanWrite() {
if (current.isNewRecord())
return;
else {
return false;
}
}
Service Now Interview Questions
B. Script Include is like re-usable function, in simple example if you want to calculate
the date different between two date fields from incident form or change form then you
can have 1 script include and can have a Glide Ajax to call from client scripting to re-
use them for both the places.
Performance
Global business rules are evaluated for every server interaction. Every insert, update,
delete, or query of a record. They are “global”. Script Includes are different. They are
loaded on-demand and cached.
If you have a number of global business rules you created on a previous version of
Service Now, you can switch them to Script Includes.
Here is an example GBR I used in for GRC report that found all Controls not linked to
Authoritative Source Content. The report isn‟t that important here, just how to convert
that GBR to a Script Include.
You‟re new Script Include. Just copy the GBR script you are using into the Script Include.
You can convert to a more object-oriented format if you want, but that is a bonus with
accompanied risk of a coding mistake. The most efficient solution is just to copy the script.
Service Now Interview Questions
Your Existing GBR. Either delete or deactivate. I choose to delete so that my past mistakes
are gone forever.
Business Rule
Name: getControlsNotLinkedtoASC
Table: Global [global]
Active: false
Script:
getControlsNotLinkedtoASC();
function getControlsNotLinkedtoASC() {
var controlList = new Array();
var grControl = new GlideRecord('grc_control');
grControl.query();
while (grControl.next()) {
var grControlAuthSource = new GlideRecord('m2m_control_auth_src_content');
grControlAuthSource.addQuery('control_name', grControl.sys_id);
grControlAuthSource.query();
if (!grControlAuthSource.hasNext()) {
controlList.push(grControl.control_id.toString());
}
}
return controlList;
}
Client Script which runs on browser side or client side. This can be triggered on load, on
change, on submit, on cell edit.
Examples
onLoad() Scripts
An onLoad() script can runs when a form is first drawn and before control is given to the
user to begin typing. Typically, you use an onLoad() script to perform some client side
manipulation of the document on screen.
For example, here is a trivial onLoad() script that displays a message box that says "Loading
..." while the page loads.
function onLoad() { alert ('Loading ...'); }
onSubmit() Scripts
For example, here is an onSubmit() script that prompts the user to confirm that a priority
one ticket should really be submitted. If the user clicks Cancel in the confirmation dialog
box, the submission is canceled.
Example
function onSubmit()
{
var priority = g_form.getValue('priority');
if (priority && priority == 1)
return confirm('Are you sure you want to submit a priority one ticket? The CIO will
be notified!');
Service Now Interview Questions
}
onChange() Scripts
A.Unlike onLoad() and onSubmit() scripts, onChange() scripts apply to a particular widget
on a form rather than to the form itself. They are fired when a particular value changes on-
screen.
An onChange() script must contain a function named onChange().
All onChange() scripts are called with several parameters:
Example
For example, here is an onChange() script that notifies the user whenever the short
description field on a form changes.
function onChange (control , oldValue , newValue , isLoading ) {
alert('you changed short description from ' + oldValue + ' to ' + newValue); }
To prevent an onChange() script from running when the form loads, add the following to the
top of the script.
if(isLoading) { return; }
onCellEdit() Scripts
Scripts can be defined as onCellEdit() to run on the client side when the list editor interacts
with a cell.
Note: onCellEdit() scripts do not apply to list widgets on homepages or dashboards.
An onCellEdit() script must contain a function named onCellEdit().
An onCellEdit() script takes the following parameters:
Example:
function onCellEdit(sysIDs, table, oldValues, newValue, callback)
{
var hasDifferentValues = false;
for(var i = 0; i < oldValues.length; i++)
{
var oldValue = oldValues [i];
if (oldValue != newValue)
{
hasDifferentValues = true;
break;
Service Now Interview Questions
}
}
var success = hasDifferentValues && performSomeFurtherValidation(sysIDs, table,
oldValues, newValue);
callback(success);
}
25) How to call business rule from client script through coding?
The Glide Ajax class enables a client script to call server-side code in a script include.
To use GlideAjax in a client script, follow these general steps.
Create a GlideAjax instance by calling the GlideAjax constructor. As the argument to the
constructor, specify the name of the script include class that contains the method you want
to call.
Call the addParam method with the sysparm_name parameter and the name of the script-
include method you want to call.
(Optional) Call the addParam method one or more times to provide the script-include code
with other parameters it needs.
It is the preferred method for executing the code, because it is asynchronous and does not
hold up the execution of other client code. Another method,
getXMLWait(),
It is also available but is not recommended. Using getXMLWait () ensures the order of
execution, but can cause the application to seem unresponsive, significantly degrading the
user experience of any application that uses it. getXMLWait () is not available to scoped
applications.
// the callback function for returning the result from the server-side code
function HelloWorldParse(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
alert(answer);
}
Example: 1
Example: 3
Script:
function onLoad() {
var approveButton = document.getElementById('approve');
var rejectButton = document.getElementById('reject');
if (approveButton) {
approveButton.style.background='green';
approveButton.style.color='white';
}
if (rejectButton) {
rejectButton.style.background='red';
rejectButton.style.color='white';
}
}
Example: 4
Field: u_awesome_check
Script:
}
}
Example: 5
CALLBACK FUNCTION
Callback functions are make JavaScript far more flexible than it would be otherwise.
Typical functions work by taking arguments as input and returning a result. Functions take
an input and return an output.
JavaScript callback functions are different. Instead of waiting for a function to return that
result, you can use a callback to do this asynchronously. This not only helps with
performance, it strongly encouraged to use callback functions and asynchronous
programming.
Client Script: Set VIP
When: onChange
Field: caller_id
When: onChange
Field: caller_id
When: onChange
Field: Category
Script:
UI scripts provide a way to package client-side JavaScript into a reusable form, similar to
how script includes store server-side JavaScript. Administrators can create UI scripts and
run them from client scripts and other client-side script objects and from HTML code.
A record producer is a type of a catalog item that allows users to create task-based records
from the service catalog. For example you can create a change record or problem record
using record producer. Record producers provide an alternative way to create records
through service catalog.
To redirect an end user to a particular page after the record producer is submitted, define the
redirect link in the Script field using any of the following:
For example, the following code redirects users to their homepage after the record producer
is submitted:
Within the Platform UI:
producer.url_redirect="home.do";
Within Service Portal:
Service Now Interview Questions
producer.portal_redirect = "? id=sc_home"
RP.getParameterValue('sysparam_id')
Coalesce is a property of a field that we use in transform map field mapping. When we set
the coalesce as true for a field mapping it signifies that this field will work as unique key. If
a field match is found with the coalesce field, then existing record will be updated with the
imported information in target table else a new record will be inserted into the target table.
UI actions are helpful to create buttons and links on form as well as list. These ui actions
script will run only when we click on that ui action.
We can write both client side and server side script in UI action. To write Client side script
we need to check the property box against client field. It asks for “on click” function. We
need to start the script with function which we have mentioned in on click field.
For server side scripting we can directly write the script.
Service Now Interview Questions
38) What are UI policies?
UI policies are alternative to client scripts. It can be used to set a field as mandatory, read-
only and visible on a form. You can also use UI policy for dynamically changing a field
on a form.
Yes we can, when we tick the advanced check box, it displays script field. There we can
write client script like g_form.setMandatory, g_form.setVisble, g_form.setreadonly.
Data policy checks the mandatory and read-only of a field whenever a record is inserted or
updated through a web-service or import set. For example: If a mandatory field in the
incoming record (from import set or web-service) is empty then the data policy will not
allow to insert that record into the table.
UI policy acts when a record is inserted or updated through a servicenow UI i.e. servicenow
forms while data policy acts whenever a record is inserted or updated into database through
any means.
The schema map displays the details of tables and their relationships in a visual manner,
allowing administrators to view and easily access different parts of the database schema.
I have written email templates, and used in notifications. Also I have created 2 kinds of
notifications 1) sending the notifications when a record inserted or updated 2) sending an
email when an event is triggered.
It is a table which maintains the information of all the tables and fields.
Yes, I have worked on Service Catalog. (Note: SRM = Service catalog in ServiceNow)
I have created catalog items with variables and variable sets. I have used workflows
And execution plans to design the workflow of a catalog item.
49) Could you please briefly explain about how to design the workflow?
Go to the workflow editor, these you can find an IDE. Click on the new to create a new
workflow. After finishing the design by using different activities then publish the
workflow.
Depends on the complexity of the design we need to choose. If the design is really complex
then we can go for workflows.
Service Now Interview Questions
52) How to create tables in Service Now?
Go to “tables and columns”, there you can create application, modules and respective tables
54) Do we have any cheat codes to open tables and forms for which we
don’t have access?
55) How can we restrict the users seeing the application and modules?
An ACL is access control list that defines what data a user can access and how they can
access it in service now.
A record producer is a type of a catalog item that allows users to create task-based records
from the service catalog. For example you can create a change record or problem record
using record producer. Record producers provide an alternative way to create records
through service catalog.
Service Now Interview Questions
60) What is the difference between Record Producer and catalog item?
Catalog items are for SRM and create a ticket in request table which has request items and
tasks, whereas record producer is a template to insert a record in any required table.
We use inbound action to create email integration. We have given a specified format to
“Orion” system. As soon as some alert comes in Orion system, it generates an email to
ServiceNow in a specified format. By using an inbound action scripting we have created an
incident ticket.
I have done like adding users to groups, assigning Roles to users and groups.
67) How do you migrate the customization and code into different instances?
We use update sets.
Service Now Interview Questions
68) Could you please tell me about update sets?
Update set is the group of customization which is used to capture all change in your
instance. And move the changes to one to other instance
Go to the local update sets, create an update set and do the changes once changes are
done, put the update sets in complete state.
We need to go to Target instance and create an update source; we need to give credentials of
the source instance. It will pull all the completed update sets of source instance to target
instance and we need to commit them in target instance.
71) Could you please tell me the procedure for creating an SLA?
We go to Sla tables and select the table on which SLA need to be established and give start,
stop, pause conditions to it.
SLA is the agreement between Vendor and Client whereas OLA is the agreement within the
organization.
I have created knowledge articles, and make them available to specific rolled users.
We can use “Meta tags” for it. Whatever we give in the Meta tags, they can be the
searchable elements for the knowledge article.
78) Could you please tell me the areas we can search for knowledge articles?
We have a module self-service application, and also we can search on any field which has a
knowledge icon against it. For example short description in incident management.
Classes are tables for storing dedicated type os devices like servers, computers databases,
data base instances.
We can extend any new table with one existing table. This brings all the existing table
fields into the new table.
I have created new site through which ESS users can be redirected to the portal page when
they login. As part of it I have created some pages using different blocks like iframes and
dynamic blocks.
85) How can you redirect the users to portal page when they login?
Yes, I recommend because of its flexibility to implement the applications also we can use
JavaScript, JQuery, and HTML like more flexible web technologies.
Yes, it is used to import different configuration items into different classes of CMDB.
Indicators, also known as metrics, business metrics, or KPIs, are statistics that businesses
track to measure current conditions and to forecast business trends.
94) How to set the default value of a date field to current datetime value?
Goto the dictionary of the respective date-time field and set the default value as :
javascript:gs.nowDateTime();
Client transaction timing provides more information on the duration of transactions between
the client and the server.This require to activate the plugin - "Client transaction timing
plugin".
Parameters:
e - Boolean variable that if true (default) enables business rules, and if false to disables
them.
By using the getRowCount() function you can retrieve the number of rows. System pro
deleteMultiple() deletes multiple records according to the current "where" clause. Does
not delete attachments,
whereas deleteRecord() deletes single record.
An encoded query string represents a complex filter on a list of records. Use encoded query
strings to include a filter as part of a URL parameter, such as the sysparm_query URL
parameter, or as a reference qualifier to restrict the data that is selectable for a reference
field.
You can create encoded query strings manually or copy them from list filters.
Yes we can call BR from CS. Any GlideRecord query should be on the Server Side
(Business Rule). You should instead write a Glide AJAX call in this scenario where
you need to pass server side data to the client.
Service Now Interview Questions
104) Can you update a record without updating its system fields
(like sys_updated_by, sys_updated_on)?
Yes, you can do it by using a function autoSysFields() in your server side scripting.
Whenever you are updating a record set the autoSysFields() to false.
example:
4. Only roles listed in this property are able to upload attachments to a record. If no
roles are entered, then all roles can upload attachments to ServiceNow forms.
5. Click Save.
Open 'All Active Transactions' under 'User Administration' and you can kill the
running transactions.
108) Which object is used to refer the current logged in user in client script?
You can use the object g_user object to get the details of current active user
Metrics record and measure the workflow of individual records. With metrics, customers
can arm their process by providing tangible figures to measure, for example, how long it
takes before a ticket is reassigned or changes state.
Data records can be captured, but you have to do it explicitly. From a list, check
your records and then use the list UI action option “Create Application File”.
115). What is the condition to check which records will be captured within
an Update Set?
To move the customization, open “sys_update_xml” table and update the “update_set”
field with correct update set.
c. Or, the workflow scratchpad is used to store data during the execution of a workflow.
Values in the scratchpad can be set and/or accessed by any activity in the workflow.
d. The scratchpad is global to the instance of the running workflow and as such,
is available equally to all activities.
e. Using the scratchpad requires at least two activities in a workflow, the sending
activity which writes data to the scratchpad, and the follow-up activity which uses
this data.
f. The scratchpad can hold variables of any JavaScript data type that can be
represented as JSON.
workflow.scratchpad.variableName = variableValue;
Or
var myValue = workflow.scratchpad.variableName;
The primary difference between these methods is that g_scratchpad is sent once when a
form is loaded (information is pushed from the server to the client),
whereas GlideAjax is dynamically triggered when the client requests information from
the server. Other methods, GlideRecord and g_form.getReference() are also available for
retrieving server information.
However, these methods are no longer recommended due to their performance impact.
Both methods retrieve all fields in the requested Glide Record when most cases only
require one field.
121). How we can get information from the server? And Among them
which are the best ones.
create g_scratchpad properties to hold this information. The g_scratchpad is sent to the
client when the form is requested, making it available to all client-side scripting methods.
This is a very efficient means of sending information from the server to the client.
For example, assume you open an incident and need to pass this information to the client:
The value of the system property css.base.color Whether or not the current record has
attachments The name of the caller‟s manager A display business rule sends this
information to the client using the following script:
g_scratchpad.css = gs.getProperty(„css.base.color‟);
g_scratchpad.hasAttachments = current.hasAttachments();
Service Now Interview Questions
g_scratchpad.managerName = current.caller_id.manager.getDisplayValue();
To access scratchpad data using a client script:
// Check if the form has attachments
if (g_scratchpad.hasAttachments) // do something interesting here
else
alert(„You need to attach a form signed by „ + g_scratchpad.managerName);
The GlideAjax class allows the execution of server-side code from the client.
Function names starting with “_” are considered private and are not callable from the
client.
getXML() getXMLWait()
To execute a script include from Business Rule, you just need to create an object of that
Script Include (which is typically a class) and call that function of that script include with
the object.
Script Include: MyScript
SLA allows the service desk to track whether or not their representatives are providing a
certain level of service.The most common use of SLAs is to ensure that incidents are
resolved within a certain amount of time.
Start
Stop
Service Now Interview Questions
Pause
Reset
Reference Qualifier is used to restrict the data that is selectable for a reference field.
Simple
Dynamic
Advanced
Dictionary Override provides the ability to define a field on an extended table differently
from the field on the parent table. For example, for a field on the Task [task] table, a
dictionary override can change the default value on the Incident [incident] table without
affecting the default value on Task [task] or on Change [change].
These are:
Missing object
Type mismatch
Collision
Uncommitted update
Application scope validation issue
147). How to call script include from the “condition” section of a UI Action?
Syntax is given below:
new Script Include Name().function name();
1. Remove the New button to prevent users from creating new rows in the
Equipment Request related table
2. Hide empty columns
3. Hide the entire list if it‟s empty
4. Enable grid editing, so that new rows can be created with a double-click
Service Now Interview Questions
149). Define ACL.
ACL is used to control what data users can access and how they can access it. The system
searches for ACL rules that match both the object and operation the user wants to access.
If there are no matching ACL rules for the object and operation combination, then the
object does not require any additional security checks and the instance grants the user
access to them.
Create:
User cannot see theNew UI action from forms. The user also cannot insert records into a
table using API protocols such as web services.
Read:
User cannot see the object in forms or lists. The user also cannot retrieve records using
API protocols such as web services.
Write: User sees a read-only field in forms and lists, and the user cannot update records
using API protocols such as web services.
Delete:
User cannot see theDelete UI action from forms. The user also cannot remove records
from a table using API protocols such as web services.
NOTE: A user must pass both field and table ACL rules in order to access a record object.
If a user fails a field ACL rule but passes a table ACL
If a user fails a table ACL rule, the user is denied access to all fields in the table even if
the user previously passed a field ACL rule. rule, the user is denied access to the fiel
described by the field ACL rule.
Order Guides
Record Producers
Content Items
List value returns a comma-separated list of sys_ids. For example: List value, return
an array which can be iterated to retrieve the individual values submitted by your user.
var sys_id_string = producer. glide_list_field ;
var sys_id_list = string. split ( „,‟ ) ;
154). How can you redirect an end user to a particular page after the record
producer is submitted?
producer.redirect=”home.do”; The following code redirects users to their homepage
after the record producer is submitted.
Service Now Interview Questions
155) Define Order Guide.
Order guides enable customers to make a single service catalog request that generates
several items.
Cascading allows values entered for variables in the initial order form to be passed to the
equivalent variables in the ordered catalog items. To enable cascading, select the Cascade
variables check box when creating the order guide. Then, create variables on the catalog
items that match the names of the corresponding variables in the order guide. When a
customer places an order, the variables on the ordered items inherit the values of the
identically named variables in the order guide.
Service Now Interview Questions
160) Can we run an order guide automatically. If so, how?
Yes, we can run an order guide automatically from within a workflow or a server script,
passing parameters to that order guide to define variable values.
162) How can you direct users to a specific catalog via a URL to a module
in that particular catalog?
In the Link Type section, select URL (from Arguments), then in the Arguments field,
enter a URL of the form catalog_home.do?sysparm_catalog=id of sc_catalog
1record&sysparm_catalog_view=view name of sys_portal_page.
catalog_home.dosysparm_catalog=742ce428d7211100f2d224837e61036d&sysparm_catal
og_view=catalog_technical_catalog
It is used to hide the item price in the cart and the catalog listing.
Service Now Interview Questions
165) What is the difference between copy and insert/insert and stay catalog
item?
Copy an item means creating a full duplicate of the item, including the item details,
attachments, variables, client scripts, and approvals. Insert only copies the item details.
166) Can a Catalog item will be available in more than one catalog
and category?
Yes, a catalog item can be available for multiple catalogs and categories.
The Branch activity splits the workflow into multiple transition paths from a single
activity.
The Join activity unites multiple concurrent execution paths into a single transition.
The Lock activity prevents other instances of this workflow from continuing past this
activity until the lock is released. For example, if a workflow is triggered when a record is
added to a particular table and multiple records are added one after the other, that
workflow will be triggered multiple times: once by each record insertion. In such cases,
you can use the lock activity to ensure that this instance of the workflow has completely
finished one or more activities before any other instance of the workflow can proceed.
The SLA Percentage Timer activity pauses the workflow for duration equal to a
percentage of an SLA. A workflow must run on the Task SLA table to use this activity.
The Timer activity pauses the workflow for a set period of time. This duration can be an
absolute time value or a relative value based on a defined schedule.
The Generate activity immediately creates task or approval records from any task or
approval activities placed after the Generate activity in the workflow execution path.
The Approval Coordinator activity is used as a container for one or more Approval –
User, Approval – Group and Manual Approval activities. When the Approval
Coordinator activity completes, all pending approvals that were created by any of the
Approval Coordinator approval activities are immediately set to No Longer Required.
The Approval Action activity sets an approval action on the current task. Use this activity
to mark the current task record as approved or rejected.
Service Now Interview Questions
178) Define Metric.
A metric measures and evaluates the effectiveness of IT service management processes.
For example, a metric could measure the effectiveness of the incident resolution process
by calculating how long it takes to resolve an incident.
181) What will you do if you want to configure the metrics on other
table apart from task table?
To apply metrics to other tables, duplicate the metric events business rule that currently
runs on the task table for the other table. For example, To apply metrics to cmdb_ci tables,
duplicate the metric events business rule that currently runs on the task table for the
cmdb_ci table. Without the events created, no metric processing can occur.
Data Lookup is used to define rules that automatically set one or more field values when
certain conditions are met. For example, on Incident forms, there are priority lookup rules
for the sample data that automatically set the incident Priority based on the incident
Impact and Urgency values. Note:
The custom table must extend the Data Lookup Matcher Rules [dl_matcher] table.
The columns of a data lookup table contain both matcher and setter field data.
The correlation Display field can contain a free-form descriptive label of what third party
system is replicating or tied to this record. For example, if you are tying incident records
to a third party ticketing system when they are created within ServiceNow, the
corresponding ticket ID from the third party would be stored in the correlation ID field.
You could also set the correlation display field to be “JIRA”, or “REMEDY”, or
whatever you want to indicate the third party system using this ticket.
Script include is basically re-usable code that are used to store JavaScript that runs on the
server.
Service Now Interview Questions
189) Why Script Include is preferred more than Global Business Rule?
Because script includes are only loaded on request.
An update set is a group of customizations that can be moved from one instance to
another.
193) In which table customizations that are associated with the update set is
stored?
Customizations are stored in Customer Update [sys_update_xml] table.
A view defines the elements that appear when a user opens a form or a list. Views are
form layouts that you can use to present the same record information in various ways.
For example, end users see a simplified view of the incident record and ITIL users see
more fields. It‟s the same data, just displayed in different ways – or views
To only update records where a match is found, and skip records where a match is not
found, specify a coalesce field and add the following script as an OnBefore script to the
transform map. if (action == „insert‟) ignore = true;
199) How can you add Applications and Homepage to Update Set?
Applications automatically include any homepages and content pages that are created
within or associated to an application. We can manually add homepages and content
pages to update sets:
To manually add a page to an update set:
202) How can you create global homepage or Homepage for specific users?
We can create it by following these steps:
We must click Edit Homepage to make changes to a global homepage that take effect for
all users who can access the homepage. If you click View Homepage and make changes,
a personal homepage is automatically created for you and those changes take effect only
on that personal homepage.
204) How can you specify a Login Landing Page using System Property?
To specify a login landing page for all users, change the property value on the
sys_properties table:
Use <page name>.do; you may omit the http://”instance”.service-now.com/ portion of the
URL. To determine the page name or the URL of a page in the system, you can point to a
link. Some possible pages are: incident.do
Service Now Interview Questions
205) Difference between Service Request and Record Producer.
A Service Request works with the cart where you can add multiple and then you can
order. On the other end it creates a request, request item, and possibly approvals and tasks
depending on its workflow.
A record producer is nothing but task based record. Record Producer uses a script or
template to create task based records, ideally not a Request.
g_user is a global object in GlideUser that references the currently active user .It contains
information about the current user.
Vendor-neutral
ITIL service management practices are applicable in any IT organization because they
are not based on any particular technology platform or industry type.
Non-prescriptive
ITIL offers robust, mature and time tested practices that have applicability to all types of
service organizations. It continues to be useful and relevant in public and private sectors,
internal and external service providers, small, medium and large enterprises, and within
any technical environment.
Best practice
ITIL represents the learning experiences and thought leadership of the world‟s best-
in- class service providers.
Service Now Interview Questions
214) Define IT service management (ITSM).
IT service management (ITSM) is defined as “the implementation and management of
quality IT services that meet the needs of the business”.
Internal services are delivered between departments or business units in the same
organization.
External services are delivered to external customers.
o Shared Services Unit: A Service Provider that caters to more than one business
units to minimize costs and risks (e.g. network, security, scripting, and
migration).
Service Now Interview Questions
o External Service Provider: A Service Provider that is part of a different
Organization as its Customer. Also known as external supplier (e.g.
outsourcing vendors).
Third parties responsible for supplying goods or services that are required to deliver IT
services.
Examples of suppliers include commodity hardware and software vendors, network and
telecom providers, and outsourcing organizations.
• Function: Refers to the people and automated measures that perform a defined
process or activity or a combination of both.
• Role: Refers to a set of actions that are performed by a person, a team or group.
• Group: Refers to a number of people who perform similar activities or processes.
• Team: Refers to a group of people who work together to achieve a common objective.
• Department: Refers to formal organisational structures that perform specific activities on
a daily basis.
• Division: Refers to a number of departments that has been grouped together.
Service Now Interview Questions
229) Define RACI model.
Service Strategy
Defining strategy for the IT Service Management and defining strategies for the
IT Services that are being provided.
The goal of Service Strategy is to specify the strategic objectives, direct and
develop policies and plans, and allocate resources to achieve the
organization‟s objectives.
2. Service Design
2. Service Transition
Service Now Interview Questions
Implement the services in order to meet the designed requirements
The goal of Service Transition is to introduce new services with appropriate
balance of speed, cost, safety and focus.
3. Service Operation
Support the services managing the operational activities
The goal of Service Operation is to carry out day-to-day operations and activities
of Services.
235) What is the use of Key Performance Indicators (KPIs) and metrics?
Key Performance Iui macross (KPIs) and metrics are used to judge the efficiency
and effectiveness of the SLA activities and SIP (Service Improvement Plan)
progress.
These metrics cover both the subjective and objective measurements:
• Subjective measurements:
Improvements in customer satisfaction
• Objective measurements:
Number/percentage of service targets being met
Number and severity of service breaches
Number of services with updated SLAs
Number of services with timely reports and active service reviews
It is the Indicator of whether the script applies to all views. When Global is selected, the
script runs regardless of what view is being displayed. When Global is not selected, this
script runs only if the current view matches the script's view.
Global application in client script means the script can be used globally meaning to all
your applications. While the other options are the name of your other application, if one of
the applications is selected, it limits the client script to be use on the current application
you've chosen.
An ACL is access control list that defines what data a user can access and how they can
access it in service now.
Types:
Objects:
*.* - means first star represents all tables and second star represents all fields on those
table.
The * when applied with table.* applies to all the fields so it is at field level.
The None when applied with table none applies at the table level.
A formatter is a form element used to display information that is not a field in the record.
Some examples of formatters in the base platform include:
UI macros are typically controls that provide inputs or information not provided by
existing field types.
245) Why do we use UI Macro and UI Page as variables for Service Catalog?
UI Macros and UI pages can be used when you need further flexibility to build solutions
that could not be built using the other catalog variable types. You can think of these like a
"block" in your catalog which you can customize as per your desire.
Slushbuckets allow users to select multiple items from a list of available items. They are
used in many operations, such as personalizing lists, adding items to related lists,
and service catalog list collector variables.
The slushbucket interface has two columns: the available items on the left and the selected
items on the right.
Incident alerts are created with a New state. They follow a process that finishes with
the Closed or Cancelled state.
A series of rules ensure that the alert progression is controlled and standardized.
Service Now Interview Questions
CMDB lifecycle:
CMDB CI Lifecycle Management provides a set of APIs to manage CI operational
states and CI actions. And the UI where you define a set of rules to restrict certain
operational state transitions and to restrict actions based on operational states. It also
provides a mechanism to audit CI operational state and CI actions during the entire CI
lifecycle.
With CI Lifecycle Management you can:
Manage CI operational states and CI actions throughout the entire CI lifecycle.
Manage CI operational state transitions.
Restrict certain operational state transitions.
Associate certain actions for certain CI types that are in specific operational state.
Restrict IT Service Management applications based on CI operational state.
Audit CI operational states and CI actions during the entire CI lifecycle.
gs.addQuery('user_name',gs.getUserName());
Select "Admin overrides" checkbox to true in the particular ACL so that they can pass the
permission check with this ACL rule.
Reverse if false: Option for specifying that the UI policy action should be reversed when
its UI policy's conditions evaluate to false. In other words, when the conditions are true,
actions are taken and when they change back to false, the actions are reversed (undone).
Yes we can call BR from CS. Any GlideRecord query should be on the Server Side
(Business Rule). You should instead write a Glide AJAX call in this scenario where
you need to pass server side data to the client.
getRowCount()
Service Now Interview Questions
257) Events in ServiceNow?
Event are special records the system uses to log when certain conditions occur and to take
some kind of action in response to the conditions.
The system uses business rules to monitor for system conditions and to generate event
records in the Event [sysevent] table, which is also known as the event log or event
queue. Event-generating business rules typically use this script logic:
If [some condition is true for the current record], then [add a specific event to the queue].
For example, here are some of the conditions in the incident event business rule:
If a user adds a comment to an incident record, add an incident.commented
event. If a user adds an incident record, add an incident.inserted event.
If a user updates an incident record, add an incident.updated event.
Event-generating business rules use the GlideSystem eventQueue method to insert event
records, which typically contain this information:
Event fields –
Name, Parm1, Parm2, Table, Instance
Event registry –
The events registry lists the events the system recognizes. Use registered events to
automate other activities, such as script actions or notifications.
259) UI Scripts?
UI scripts provide a way to package client-side JavaScript into a reusable form, similar to
how script includes store server-side JavaScript. Administrators can create UI scripts and
run them from client scripts and other client-side script objects and from HTML code.
To create UI scripts, navigate to System UI > UI Scripts and create or edit a record.
Field Description
Service Now Interview Questions
Script Name of the UI script. Ensure the name is unique on your system.
Name This is the same as the Name field for the Eureka release and earlier.
API Name The API name of the UI script, including the scope and script name
(for example, x_custom_app.HelloWorld) (starting with the Fuji
release).
Application Application that contains the UI script (starting with Fuji).
Active Indicator of whether the UI script is active. Only active UI scripts can
run.
Global Indicator of whether the script loads on every page in the system.
Note: Use caution when creating global UI scripts because they can
impact performance. You cannot create a global UI script in a scoped
application (starting with the Fuji release).
Description Summary of the purpose of the script
Script Client-side script to run when called from other scripts.
The process flow formatter quickly summarizes multiple pieces of information about a
process and displays the stages graphically at the top of a form. Each record on the
Flow Formatter [sys_process_flow] table represents a process stage and can have a
different condition applied to it.
A catalog item works with the cart where you can add multiple and then you can order. On
the other end it creates a request, request item, and possibly approvals and tasks depending
on its workflow.
A record producer is nothing but task based record, most commonly create an incident.
Record Producers: Enable records to be created directly from the service catalog. For
example, allow customers to raise incidents from the service catalog.
Order Guides: Create and edit standard groups of related items, allowing end users to
easily order these items in one request.
The HTML sanitizer automatically cleans up HTML markup in HTML fields and
translated HTML fields to remove unwanted code and protect against security concerns
such as cross-site scripting attacks.
The HTML sanitizer works by checking the built-in white list for markup that you always
want to preserve. The sanitizer provides the HTML Sanitizer Config script include that
administrators can use to modify the built-in white list. Items can also be added to the
black list, which overrides the white list, to remove HTML markup.
The following types of items can be added to white and black
lists: Global attributes
Any HTML elements
Note: By default, URL attributes like href and src support only these protocols:
http
https
mailto
For example:
<a href="https://community.servicenow.com/welcome">Community</a>
The Default White List
BUILTIN_HTML_WHITELIST :{
globalAttributes:{ attribute:["id","class","lang","title","style"],
attributeValuePattern:{}},
label:{ attribute:["for"]},
font:{ attribute:["color","face","size"]},
a:{ attribute:["href","nohref","name","shape"]},
img:{ attribute:["src","name","alt","border","hspace","vspace","align","height","width"},
Service Now Interview Questions
table:{ attribute:["border","cellpadding","cellspacing","bgcolor","background","align","no
resize","height","width","summary","frame","rules"]},
th:{ attribute:
["background","bicolor","abbr","axis","headers","scope","nowrap","height","wid
th","align","valign","char off","char","colspan","rowspan"]},
td:{ attribute:
["background","bicolor","abbr","axis","headers","scope","nowrap","height","wid
th","align","valign","char off","char","colspan","rowspan"]},
thead:{attribute:["align","valign","char off","char"]},
tbody:{attribute:["align","valign","char off","char"]},
tfoot:{attribute:["align","valign","char off","char"]},
colgroup:{attribute:["align","valign","char off","char","span","width"]},
col:{attribute:["align","valign","char off","char","span","width"]},
p:{attribute:["align"]}, style:{attributeValuePattern:
{"type":"text/css"}}
canvas:{ attribute:["height","width"]},
details:{ attribute:["open"]},
button:{ attribute:["name","value","disabled","accesskey","type"]},
form:{ attribute:["action","name","autocomplete","method"]},
Service Now Interview Questions
input:{ attribute:
["name","size","maxlength","autocomplete","checked","alt","src","type","value",
"disabled","readonly","accesskey","border","usemap"]},
select:{ attribute:["name","disabled","multiple","size"]},
textarea:{ attribute:["rows","cols","name","disabled","readonly","accesskey"]},
option:{ attribute:["disabled","value","label","selected"]},
div:{ attribute:["align"]},
ol:{ attribute:["start","type","square"]}
ul:{ attribute:["type","square","itemscope","itemtype","itemref"]}
span:{ attribute:["color","size","data-mce-bogus","itemprop","face"]}
br:{ attribute:["clear"]}
h3:{ attribute:["itemprop"]}
html:{ attribute:["xmlns","lang","xml:lang"]}
link:{ attribute:["rel","type","href","charset"]}
meta:{ attribute:["name","content","scheme","charset","http-equiv"]}
pre:{ attribute:["xml:space"]}
By default, the system generates a watermark label at the bottom of each notification
email to allow matching incoming email to existing records.
The watermark always includes "Ref:" and a customizable prefix, followed by the auto-
numbered identifier of the source record, such as incident, problem, or change request.
The default prefix is MSG. For example, Ref: MSG3846157.
Watermarks are always generated, but you can configure them to:
Create a custom watermark prefix for each instance to prevent accidentally triggering
events in the wrong instance.
Have custom prefix characters after MSG
Be hidden globally
Be omitted from individual email messages
Record producers: giving alternative ways of adding information such as Incidents via the
service catalog.
Order guides: to group multiple catalog items in one request.
Content Items: catalog items which provide information instead of goods or services.
The script field in an order guide can be used to add or remove catalog items to or from
the order guide. It can be added to the order guide form by configuring the form layout.
To add a catalog item that is not added to the order guide via a rule base, write the
following code in the script field:
guide.add(“<sys_id_of_cat_item>")
To remove a catalog item that is added to the order guide via a rule base, write the
following code in the script field:
guide.remove(“<sys_id_of_cat_item>")
Request will be having request items and request items will be catalog tasks.
It is the table where we can write functions which can be invoked in any scripts either
server side or client side.
277) Why can’t we use a global business rule instead of a script includes?
Global business rules will be invoked every time when there is an insert or update of a
record. It will hamper the instance performance. So it is recommendable to use the script
include.
We use this invoke a script include into a client script provided the script include should
be client callable.
Yes, I have created many reports and scheduled the reports as well.
Service Now Interview Questions
281) Do you have averny idea on ITIL Processes?
Yes, I have undergone the training for ITIL, I have basic knowledge on ITIL Processes.
We can call any item either hardware or software as configuration item while raising an
incident, problem or change. It is mandatory to put a configuration item to know where we
have an issue.
We were using some legacy tools, when we were planning to migrate to ServiceNow we
have moved all the inventory of CMDB into excel sheets. We have imported that excel
sheets into appropriate classes of Service Now CMDB.
We have import sets in ServiceNow through which we can import the data of different
formats into ServiceNow.
It transfers the data from import set table which is created by data source to the table
which is in ServiceNow.