0% found this document useful (0 votes)
377 views111 pages

Service Now Questions

ServiceNow is a cloud-based ITSM tool designed to automate business processes and enhance IT service delivery through various applications and modules. It offers features like Personal Developer Instances for testing, a user-friendly interface, and capabilities for customization and integration. The document also covers topics such as user administration, change management, and the importance of plugins and contextual search within the ServiceNow ecosystem.

Uploaded by

gantanaresh.mpl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
377 views111 pages

Service Now Questions

ServiceNow is a cloud-based ITSM tool designed to automate business processes and enhance IT service delivery through various applications and modules. It offers features like Personal Developer Instances for testing, a user-friendly interface, and capabilities for customization and integration. The document also covers topics such as user administration, change management, and the importance of plugins and contextual search within the ServiceNow ecosystem.

Uploaded by

gantanaresh.mpl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1

1.What is ServiceNow?

ServiceNow is a cloud-based ITSM tool used to automate your business processes and
provide the best service to customers in all aspects of IT services. These services can
potentially exist within the ServiceNow ecosystem of modules, allowing for broad control
over how to allocate resources effectively and design the process flow of those services.
2 .Could you please elaborate more about ServiceNow?

 One Platform, Numerous Applications, and Modules


 Cloud Based Platform
 Simple Programming
 Easy Upgrade Process
 More Data Centers
 Enhanced Customization with JavaScript
 Supports SaaS and PaaS
3. What is the importance of PDI and Demo Data?
Personal Developer Instances (PDI) serve as a platform for exploring ServiceNow features,
designed for use by developers, customers, and partners. The key objective behind PDI is to
provide an environment that does not impact the production instance.

Additionally, demo data is provided to illustrate how various applications function.


4 . Could you tell me about your experience with ServiceNow?
Previously, my client used the BMC Remedy tool. However, they decided to migrate to
ServiceNow, so I received training on ServiceNow. At the beginning of my career, I focused
solely on the administrative aspect. Later on, I had the opportunity to work in other areas
such as development, implementation of scoped applications, and eventually, I also worked
on integration tasks.
5. What have you done in ServiceNow?

I am involved in wide range 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. How can I determine the version of ServiceNow?
stats.do
7 .What is the current version of ServiceNow?
Aspen - 2011 Berlin - 2012 Calgary - 2013
Dublin - 2013 Eureka - 2014 Fuji - 2015
Geneva - 2015 Helsinki - 2016 Istanbul - 2017
Jakarta - 2017 Kingston - 2018 London - 2018
Madrid - 2019 New York - 2019 Orlando - 2020
Paris - 2020 Quebec - 2021 Rome - 2021
San Diego - 2022 Tokyo - 2022 Utah - 2023
Vancouver - 2023 Washington - 2024 Xanadu - 2024
Yokohama - 2025 (Expected)
Zurich - 2025(Expected)
8 .What is User Interface?
2

User Interface in ServiceNow refers to the graphical representation and interaction


components that allow users to engage with the platform.

9. What is the significance and purpose of the "Impersonate User" feature in ServiceNow?

Administrators can impersonate other users within the ServiceNow system for testing
purposes and view impersonation logs. The impersonation option is not visible in the mobile
view of the platform.

While impersonating another user, the administrator gains access to exactly the same
resources and functionalities as that user, including menus and modules. The system records
all actions performed by the administrator during impersonation as if they were executed by
the impersonated user.
10 . What is the purpose of annotations in ServiceNow?

Annotation is a form element used to display the static information and highlight form
elements by displaying blocks of colored text or separators between form elements.
+919901

11 . What is the Formatter in ServiceNow?

A formatter is a form element used to display information that is not a field in the record.
You can add formatters into a form by configuring it accordingly
12 . Types of formatters in ServiceNow?

• Process Flow formatter


• Activity Filter formatter
• CI Relationship formatter
• Parent Breadcrumbs formatter
• Approval Summarizer formatter
• Contextual Search Result Formatter

13 .Is it possible to create custom formatters in ServiceNow?

Yes, it is possible to create custom formatters in ServiceNow. Custom formatters allow you to
define specific ways to display information that may not be achievable through standard
formatting options. By leveraging scripting and configuration capabilities, you can tailor form
elements to meet your specific requirements and present data in a manner that suits your
needs.

14. What is contextual search and its importance?

In ServiceNow, contextual search means a smart search that looks at what a user is looking
for, the information user is looking through, and the person's job in the system. This way, it
gives better search results that fit what the user wants. It helps users find the right records,
articles, and other things they need in ServiceNow.
3

Importance of Contextual Search in ServiceNow:

• Easy and Efficient Navigation

• User-Friendly Experience

 Increased Productivity

 Personalization

• Knowledge Management

 Reduced Training Time

 Predictive Insights
15 . Is it possible to set up contextual search for a Record Producer?
Yes, We can Setup.

Procedure:

1. Navigate to Contextual Search > Record Producer Configuration.

2. You can also achieve the same by opening a search context and click on the New button in
the Record Producer Configurations related list.

16 .What does the term "Dot-Walking" refer to?


Dot-walking provides access to fields on related tables from a form, list, or script. If the table
you're on has a reference to another table, you can use dot-walking to get to fields on that
referenced table.

Note: Keep in mind that it's generally recommended to limit dot-walking to 3 levels,
meaning you access fields on up to three related tables. This helps maintain performance
and clarity in your ServiceNow configuration.

17 .What is the importance of Dot-Walking in ServiceNow?

Dot-walking references a field by building a chain of field names separated by dots (periods).
For instance, incident.caller.manager refers to the manager of the person who made the
incident report.

The recommended limit for chain length is three levels.


Example: incident.caller.department

18. Is it possible to make a field mandatory via form design?

Yes, just enable mandatory checkbox.


4

19 .What is a plugin in ServiceNow?

Plugins are software components that provide specific features and functionalities within a
ServiceNow instance. Plugins can be added to the base platform through different methods.
They can be either activated by default in the base ServiceNow system or manually activated
by an administrator.
20. Have you gained any experience with activating plugins?

Yes, I have good experience in plugin activation.

21 . What are the advantages of ServiceNow plugins?

ServiceNow plugins offer several advantages that enhance the functionality and flexibility of
the platform.

Here are some key benefits:

• Customization and Extensibility


• Rapid Development
• Sandbox Environment
• Third-party Integrations
• Version Management
• Reuse and Sharing

22 .Why is acknowledgment required for certain plugins before activation?

Some plugins that introduce a new feature, state, functions, etc... which are not active by
default in previous family releases, may require acknowledgment prior to activation to
inform you of any potential impacts the plugin might have once activated.

23.What are the different types of tables in ServiceNow?

There are 2 types of tables in ServiceNow


1. Global Tables (Predefined Tables)
2.Custom Tables (User Defined Tables)

24 . Could you please provide the names of some important tables in ServiceNow?

Here are the names of some important tables in ServiceNow

 incident , problem, change_request , sys_user, sys_user group , task

 sc request, sc_req_item, alm_asset , cmn_department, cmn_company,


cmn_location

25 .What is the parent table of Incident, Problem, and Change?


5

Task(task) Table

26 .Could you please provide some examples of parent tables in ServiceNow?


Task(task], Configuration Item[cmdb_ci]
27 .What is a schema map in the context of tables?

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.

 The schema map can also be printed directly from a browser.

 Schema relationship types supported, and the colors used for them.

28 .What is the purpose of the Task table?


Task [Task] table is one of the core table that comes with the base system. It provides a set
of standard fields that are used across other tables that extend it, such as the Incident
[incident) and Problem [problem] tables. Additionally, any table that extends from the "Task"
table can make use of specialized task-related functionalities to manage and facilitate tasks
effectively.

29. What are Data Dictionary tables?


Data Dictionary tables in ServiceNow refer to a set of tables that store metadata and
configuration information about other tables and fields within the platform.

These tables play a crucial role in defining the structure and behavior of the data stored in
the system.
There are 3 main data dictionary tables in ServiceNow:

Tables [sys_db_object]: This table stores a record for each table present in the instance.
Dictionary Entries [sys_dictionary]: This table contains additional details for each table and
the definition for every column on each table. Each row represents either a column on a
table or an entire table.
Field Labels [sys_documentation]: This table contains the human-readable labels and
language information.

30 Is it possible to create a custom table in ServiceNow?


Yes, We can create custom table.

31.Can we delete global table from SericeNow?


No, the system will not support it
32 . What are some examples of global default fields?

Global default fields are system-wide fields that are automatically present in most tables
within the ServiceNow platform. They provide consistent and fundamental information
across various tables.

Here are some examples of common global default fields:


6

Field Type Description


System Class If the table is extensible, a string field that indicates
Class [sys_class_name]
Name which child table contains the record.
Created A time-stamp field that indicates when a record was
(sys_created_on] Date, Time created.
Created by (sys Astring field that indicates the user who created the
created_by] String record.
Sys id (sys_id) Sys ID The unique record identifier for the record.
Updates A nurmeric field that counts the number of updates
(sys_mod_count) Integer for this record since record creation.
Updated by [sys A string field that incicfestheater who most recenthe
updated_by] String updated the record
Updated
sys_updated_on Date/Time A time stamp field that indicates

33. What is a dictionary override, and what is its significance?

Dictionary override enables system administrators to define certain field settings on an


extended table differently from those on the parent table without affecting the parent table
or its extended tables. These overrides are configured within the dictionary entry record for
the field located on the parent table.

34 . What is a Database View, and why is it important?


A database view defines table joins for reporting purposes.
For example, a database view can join the Incident table to the Metric Definition and Metric
Instance tables. This view can be used to report on incident metrics and may include fields
from any of these three tables.

A number of useful database views are installed with the Database View plugin and the
Database Views for Service Management plugin. These database views cover most metric
reporting needs and greatly reduce the need to define new ones

35 .Have you gained any experience in User Administration?

Yes, I have good experience in user administration


36. What is the difference between a Base Table and a Core Table?
7

37 . What tasks have you performed in User Administration?


In my role in User Administration, I have been responsible for a range of tasks.

• Created user accounts, groups, and roles.

 Established departments, companies, locations, and countries.

 Configured delegate users.

 Designated users as VIPs.

 Managed the addition and removal of members from groups.

 Assigned roles to both users and groups.

38. Can you provide some examples of predefined (Out of the box) roles?

 admin
 itil
 agent_admin
 Itil_admin
 approval_admin
 Incident_manager
 approval_user
 knowledge
 asset
 Knowledge_admin
39 . What is the importance of a read-only role?
8

The read-only role (snc_read_only) restricts a user or a group of users to read-only access
on the tables to which the user already has access.

1. User Cannot insert, update, or delete records from the Ul or


2. User Cannot activate or upgrade plugins.
3. User Cannot directly run SQL statements.
4. Cannot upload any XML files.
40. Could you please explain the incident life cycle and State Model ?

Incident refers to a specific type of record that represents any unplanned interruption or
disruption in normal IT services or business operations

Incidents interrupt regular services, such as when a user's computer malfunctions, the VPN
fails to establish a connection, or the printer experiences a jam. These are unplanned events
that require help from the service provider to restore normal function.

Life Cycle and State Model:

41 . Could you please explain the lifecycle and state model of Problem Management?

1. A problem is defined by ITIL as the cause of One or More Incidents


2. Some incidents, such as a malfunctioning mouse at a user's workstation, are not indicative
of a problem.
3. Problem Management supports the ITIL process to find and fix the root cause of issues
that result in incidents.
4. You can record problems, associate incidents, and assign them to appropriate groups.
5. You can create knowledge article from problems, request changes, escalate, and manage
problems to its resolution and reporting.
6. Other incidents, such as repeated network outages, initiate problem investigations due to
their frequency
9

42 . What is a Problem Task, and how can it be created?

A problem task is the smallest unit of work that you should perform to complete a problem.
State transition of a problem task guides you through the stages of a problem task life cycle,
from creation to closure.

If a problem coordinator requires help to resolve a problem, the coordinator can create and
assign problem tasks to assignment groups or users to complete those activities.

43 . What is the significance of a Communication Workaround?

"Communication Workaround" refers to a specific type of workaround that is used in the


context of Incident and Problem Management. It focuses on providing communication to
users, customers, or stakeholders when a service disruption occurs. It acknowledges that
there is an issue and provides information on how to handle the situation until a permanent
solution is implemented.

44 . Is it possible to create a new change type?

Yes, it is possible to create a new change type in ServiceNow. ServiceNow provides flexibility
for customizing and configuring various aspects of its features, including creating new
change types to suit specific organizational needs.
45 . What is Change Management in ServiceNow?

1. Change management (sometimes abbreviated as CM) is a collective term for all


approaches to prepare and support individuals, teams, and organizations in making
organizational change.

2. It includes methods that redirect or redefine the use of resources, business process
budget allocations, or other modes of operation that significantly change a company or
organization

3. The ServiceNow Change Management application provides a systematic approach to


control the life cycle of all changes, facilitating beneficial changes to be made with minimum
disruption to IT services.

46. What are the different types of changes in the Change Management application?

There are 3 types changes in ServiceNow

 Normal Change
 Standard Change
 Emergency Change

47 . What is the difference between 'Normal,' 'Standard,' and 'Emergency' changes?


10

Normal change: A normal change is typically initiated when a developer intends to make
modifications. It requires CAB approval as it follows the standard change management
process.
Standard change: A standard change does not require CAB approval prior to making
modifications. It is pre approved due to the frequent nature of similar changes being
performed.
Emergency change: An emergency change is implemented when a customer raises an
urgent change request. The respective developer needs to implement the changes
immediately, with CAB approval if possible.

48 . What is risk assessment, and how can it be configured?

There are two methods to calculate the risk of a change. The Best Practice
Change Risk Calculator is activated in the base system by default. Change Management Risk
Assessment is optional.

 Change Risk Calculator uses predefined properties and conditions to calculate a risk
value.
 Change Management. Risk Assessment uses information provided by the end
 user to assess a risk value

The two methods can be used individually or together, depending on your requirements. If
the methods are used together, the highest risk value from both methods is always selected

Note: Activate Below Plugin to configure Risk Assessment


Change Management - Risk Assessment

49 . What is user impersonation, and how is it beneficial?

Impersonating a user is useful for testing purposes or gaining access to another user's
desktop in order to better understand a customer's issue. During impersonation, ServiceNow
records all administrator activities.
50 .What technique is used to search for a record in ServiceNow?

Zing is the search engine technology used by ServiceNow for conducting text searches.
51 . What is BSM Map?

BSM or Business Service Management map graphically displays configuration items. These
items indicate the status of configuration items and support a business service.
52. What do you understand by HTML Sanitizer?

The HTML Sanitizer is used to automatically clean up HTML markup in HTML fields. It
protects against security concerns and removes unwanted tags. It is active for all instances
beginning with the Eureka release.

53. What is an 'application' in ServiceNow Platform?


11

An application is a collection of modules that provide related information. For example, an


incident application consists of modules that allow users to create new incident tickets, view
all incident tickets, and review resolved incidents.

54 . What is the Data Dictionary and Data Dictionary Tables?


Data Dictionary is a component that defines and manages the structure, properties, and
relationships of tables and fields within the platform. Data Dictionary Tables are specific
tables within the ServiceNow instance that store metadata about other tables and fields.
These tables provide information about the structure and attributes of the instance's
database.

55 . What is Dictionary Override in ServiceNow?

Dictionary Override refers to a customization or modification made to the properties or


attributes of a field within a table using the Data Dictionary. It allows you to change specific
properties of a field while keeping the original field intact. Dictionary Overrides are typically
used to tailor the behaviour of fields to meet specific requirements without altering the
original structure of the table or field.

56. What is an inactivity monitor?

An "inactivity monitor" is a tool or mechanism that tracks periods of user inactivity or lack of
interaction within a system, application, or environment. It is commonly used in software
applications, websites, and other digital platforms to perform specific actions when users
remain inactive for a certain period of time
57. What are the search options available in ServiceNow?

The search options are:


Knowledgebase: To find knowledge articles
Lists: Used to find records in a list
Search scenes: Custom module created by administrators
Navigation filter: Filters the items in the application navigator
Global Search: Helps record in multiple task tables
Wildcard characters: Expand search results to match any non-space character
58 . What is an installation exit?

In practical terms, installation exits are used for user authentication into the system (local
and SSO like SAML, etc.). They can be customized, but generally don't have to be adjusted
much.

59. What is a sys_id in ServiceNow?

A unique 32-character GUID that identifies each record created in each table in ServiceNow

60 . What is a view?
The view defines the arrangement of fields on a form or a list. For one single form, we can
define multiple views according to the user preferences or requirements.
12

61. What is the purpose of a view in ServiceNow?

In ServiceNow, a "view" refers to a specific presentation or arrangement of data within a


table. Views are used to display records from a table in a particular format, making it easier
for users to access and analyze the data.

62 .How to remove 'Remember me' checkbox?

To remove the "Remember me" checkbox in ServiceNow, you can follow these steps

 Log in to ServiceNow as an administrator or a user with the necessary permissions.

 In the application navigator, search for and select "System Properties

 Within "System Properties," search for the property named "glide ui remember_me"
(You can use the filter option to find it quickly).

 By default, the value of "glide.ui.remember_me" is set to "true," which enables the


"Remember me" checkbox. To remove the checkbox, change the value to "false"

 After making the change, remember to save the updated property.

By setting the "glide.ui.remember_me" property to "false," the "Remember me checkbox


will no longer be displayed on the login page, and users will not have the option to use the
"Remember me" functionality when logging in

63. What is HTML Sanitizer?

The HTML Sanitizer is used to automatically clean up HTML markup in HTML fields and
removes unwanted code and protect against security concerns such as cross-site scripting
attacks. The HTML sanitizer is active for all instances starting with the Eureka release.

64 . What is ServiceNow studio?

ServiceNow Studio is a powerful development environment within the ServiceNow platform


that allows users to create and customize applications, modules, and other elements
without directly modifying the core code of the platform. It provides a user-friendly interface
for developers, administrators, and business analysts to build and extend applications using
low-code or no-code methods

UI Policy and Data Policy


65. What is the purpose of a UI Policy?

Ul Policies are executing on client side (with in browser) and dynamically change the
behavior of information on a form.
13

For example, you can use Ul policies to

 Make the number field on a form read-only,


 Make the short description field mandatory,
 Make the on hold reason field hide.

Basic Ul policies do not require any scripting, however for more advanced actions, use the
Run scripts option

You can also use client scripts to perform all of these actions, but for faster load times use Ul
policies when possible.

66 . Importance of order number in UI Policy?

The processing sequence occurs from the lowest to highest number. If two policies conflict,
the Ul policy with the higher number executes. For inherited Ul policies, the extended (child)
table's Ul policies are executed first. Then the base table Ul policies are executed; both
follow the order from lowest to highest specified value.

67 . What does the "Reverse if false" condition mean in UI Policy?


Ul policy action should be reversed when the conditions of its Ul policy 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.

Note: Must be enabled checkbox


68 . Does the UI policy execute on the client side or the server side?

Client Side

69 . What does the term "Global checkbox" refer to in UI Policy?


It is an option for specifying whether the Ut policy applies to all form views. If this checkbox
is cleared, the Ul policy is view-specific

By default, the Global Ul policy applies to all form views. However, a Ul policy can be specific
to a view. For example, you can define a Ul policy for only the itil view of a form. Use the
View field to accomplish this

70 . Is it possible to write a script in a UI Policy?

Yes, we can write the script in the Ul policies but it is not recommended as a best Practice.

ServiceNow Developers can write scripts in one or both script fields depending on the
application requirements: Write script logic inside the on Condition function which is
automatically inserted in the scripting fields. The on Condition () function is called by the UI
Policy at runtime.
14

If you want to make a fields as Read Only or Mandatory or Visible, then go for Ul Policy and
add the appropriate UI Action other than that if you want to perform any Form Validations
then go for Client Script.
Although, if you want to write the script in the UI Policy then there is a Section as "Script".
Under that there is a field as "Run Script". Select it, now you will see the area under which
you can write your script.

71 . Is it possible to hide related lists using a UI Policy?

Yes, through Related lists actions

72 . What does the term "Data Policy" refer to?

Data policies used to enforce data consistency by setting mandatory and read- only states for
fields.

Data policies are similar to Ul policies, but Ul policies only apply to data entered on a form
through the standard browser Data Policies are running on server side

73 . Where can we apply Data Policy?

Data policies can apply rules to all data entered into the system, including data brought in
through Import sets or web services and data entered through the mobile Ul and Rest and
SOAP or Script-Background or List View.

74 . Is it possible to convert a UI Policy to a Data Policy?


Yes
75 .Is it possible to convert a Data Policy to a Ui Policy?
Yes.
76 . What are the scenarios or reasons for converting a UI Policy to a Data Policy?

You can also apply a Ul policy to import sets or to data imported by SOAP web services when
you convert it to a data policy.
Converting a Ul policy to a data policy deactivates the Ul policy.

To retain the policy in the Ul, ensure that the Use as UI Policy on client checkbox is selected
on the data policy record.

For a Ul policy to be eligible for conversion to a data policy, The following conditions must
be met on the UI Policy form.

 The "Run Scripts" checkbox must be cleared.


 The "Global" checkbox must be selected.
 None of the Ul policy actions can have Visible set to True or False.
 Visible must be set to Leave Alone
77 . Is it possible to hide a field through Data Policy?
No
15

78 .How can you make all fields read-only at once?

function onCondition() {

var fields = g_form.getEditableFields();


for (var x = 0; x < fields.length; x++) {
g_form.setReadOnly(fields[x], true);}}

79. What are the differences between Ul Policy and Data Policy?
UI Policy Data Policy
Ul Policy is running on Client Side Data Policy is running on Server Side
It runs every time when the form is
Loaded On Load is not available in Data Policy
Hide Related Lists through UI Policy Can't hide Related List
When we convert UI policy to Data When we convert Data policy to Policy then
Policy then deactivate Ul Policy deactivate Ul Policy record. Note:
Alternatively, you can enable checkbox that
Use as UI Policy on client
Data Policy applying on Import Sets, REST or
SOAP, Web Services, List View, Script-
Ul Policy apply for only browser window Background
Ul Policy Actions are used to fields Read
Only, Mandatory, Visible, Clear the Data Policy Rules used to fields make
field value Mandatory and Read Only

Metrics and Related Lists


80 .What does the term "Metrics" refer to in ServiceNow?

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. Sometimes a metric can be easily
obtained from the data.

Note: For example, to find the number of incidents that were created today,

81 .What is a Related List and what is it's importance?


Related lists appear on forms and display records from tables that are related to the current
record. A related list on a form serves the purpose of providing additional information
related to the form record and gives a quick overview of how the other records would be
affected if something is modified in the current form record. Also, it provides an ease of
creating new records or adding existing records, based on the permissions available to user,
from the child table for the parent one.
82 . When can we create Related Lists?
16

Defined related lists allow relationships between arbitrary tables to be expressed as a


related list. Any two tables that can have a logical relationship can appear as a parent/child
pair via a related list. The following are some examples.

1. On an incident record, show all incidents opened by the same caller.

2. On a user record, show the last 20 transactions that user has made

3. On an incident record, show all problems opened on the reported CI

SLM and SLA'S


Service Level Agreement

84 .What is Service Level Management?

The ServiceNow Service Level Management (SLM) application enables you to monitor and
manage the quality of the services offered by your organization. Service Level Managers are
responsible for a set of agreements between a service provider and customer that define
the scope, quality, and speed of the services being provided.

85 . What is the purpose of Service Level Management?

• The intention of SLM is to provide the customer with an expectation of service within a
known timescale and the ability to monitor when service levels are not being met.

SLM can be used across the organization in departments such as HR, Facilities, and IT to
track how internal and external teams are performing against their agreed service levels.

86. What information is included in an SLA?

 A description of the services provided to the customer,


• A description of the performance service levels used by the provider to
 demonstrate the quality of customer service:
 Service level performance targets which are benchmarked against industry best
practices;
 Roles and responsibilities of the Customer;
 Rates for services provided and billing process;
 The SLA renewal process.

87 .What are the types of SLAS?


ServiceNow contains 3 types of SLAS

1.SLA (Service Level Agreement)


2.OLA (Operation Level Agreement)
3.UC (Under Pinning Contract)
17

88 . In which table are SLAS (Service Level Agreements) stored for incidents?

task sla

89. What is Retroactive start and it's importance?

If you select the Retroactive start checkbox, the Set start to field appears, offering options
for starting the SLA from various events on the table selected.
For example, if an Incident's priority is changed to 1 (Critical) and a Priority 1 SLA is
attached at that time, Retroactive start means that the SLA counts from when the incident
was first created, rather than from when the Incident's priority changed. If Retroactive start
is cleared, the SLA starts on the date and time that it was attached to the Incident.

90 . What conditions are included in the SLA definition?


There are 4 conditions included in SLA Definition

Start Condition
Pause Condition
Stop Condition
Reset Condition

91 . What is the difference between SLA, OLA, and UC?

Service Level Agreement (SLA):


It is an agreement between an IT service provider and IT customer, it defines key service
target and responsibilities of both parties.

Operation Level Agreement (OLA):


It is an agreement between an IT service provider and another part of same organization
that assist with the provision of service. A facilities department that maintaining Network
team supports the (network services).

Underpinning Contract (UC):


It is a contract between an IT service provider and external third part vendor covering
delivery of services that support it organization in its delivery of services.

92 . What is the difference between Response and Resolution in SLA?

The difference between "response" and "resolution" in an SLA (Service Level Agreement)
lies in their meanings and implications:

Response Time: This refers to the duration within which a service provider acknowledges a
request or issue. It signifies the initial communication between the service provider and the
requester.
Resolution Time: This is the time taken by the service provider to fully address and resolve
the reported issue. It includes diagnosing the problem, implementing a solution, and
verifying that the issue has been successfully resolved
18

93 . Can an SLA have different workflows?

Yes, an SLA (Service Level Agreement) can indeed have different workflows. An SLA outlines
the agreed-upon levels of service that a service provider promises to deliver to a customer.

94 . Is it possible to run an SLA based on the caller's time zone?

Yes, it is possible to run SLA (Service Level Agreement) based on the user's time zone. SLAs
can be configured to consider different time zones to ensure that service performance and
response times are measured and met according to the specific time zone of the users or
customers involved. This allows for a more accurate and fair assessment of service levels,
especially in cases where services are provided to users across different geographical
locations with varying time zones
95 . What is a scheduled SLA, and what is it's importance?

A "scheduled SLA" stands for "Scheduled Service Level Agreement." It refers to a specific
type of SLA that is time-bound and has predefined performance targets and metrics to be
achieved within a set schedule.

The importance of a scheduled SLA lies in its ability to set clear expectations and
commitments between service providers and customers

96. What is the purpose of reset condition?

The purpose of the reset condition is to determine the circumstances or triggers under
which a certain process or counter is reset back to its initial state or value. It helps establish
a criteria-based mechanism for restarting a process or resetting a parameter, often to
maintain accurate tracking or to ensure that actions are taken in response to specific
conditions.
97 . What is the difference between Simple and Default SLA Condition Rules?

In the context of Service Level Agreements (SLAs), "Simple" and "Default" refer to different
types of condition rules used to define the criteria under which the SLA's terms are applied.
Here is the difference between the two.
1. Simple SLA Condition Rules:

• These are straightforward and basic conditions that trigger the application of the SLA.
• They are often based on a single criterion, such as response time or resolution time.

2. Default SLA Condition Rules:

• Default rules are more comprehensive and versatile compared to simple rules.
• They can incorporate multiple conditions, thresholds, and criteria that need to be
met for the SLA to take effect.

Import Sets
19

98 . Could you please explain what an import set is and elaborate its significance?

Import sets is an application within ServiceNow used to import bulk data into ServiceNow
tables from various data sources, and then map that data into ServiceNow tables.

99. What is a Transform map?

A transform map is a configuration or blueprint within a data integration process that


defines the relationships between fields in source and target data tables. It specifies how
data from one table or source is mapped, transformed, and loaded into another table or
target, often in a different format or structure. Transform maps are commonly used in
Extract, Transform, Load (ETL) operations to ensure accurate and efficient data migration,
synchronization, or consolidation between different systems or databases.

100 . What is the Importance of Auto Map Matching Fields?

The importance of Auto Map Matching Fields lies in its ability to streamline and simplify the
data import process within ServiceNow. By automatically, matching staging table columns to
target table columns based on their names, this feature eliminates the need for manual
mapping, reducing the risk of errors and improving data accuracy.

101 . What is the role of Mapping Assist in import sets?

Mapping Assist in import sets is a helpful feature that assists users in mapping data from
external sources to ServiceNow tables during the data import process. Itsimplifies and
streamlines the mapping process by providing recommendations and automatic suggestions
for field mappings.
102 . What is Coalesce, and why is it important?

The coalesce option allows you to update existing target table records when transforming
import data.

Coalesce is feature of a field that is used in transform map field mapping and enables you to
use the field as a unique key. If a match is using the coalesce field and get detected, the
existing record will be updated with the information being imported. If a match is not found,
then a new record will be inserted into the database.

103. Is it possible to create a Multiple-field coalesce?

Yes, we can create multiple-field coalesce, but it should be indexed.


104. How can you import data from an LDAP server in ServiceNow?

Configure LDAP Integration: Access the ServiceNow instance and navigate to the "System
LDAP" application. Configure the LDAP server settings, including the server address, port,
protocol (LDAP or LDAPS), and any required authentication credentials.
20

105 . What is the Use of Conditional coalesce scripts?

Updates only.
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;

106 . How to Improve Import Set performance via index?

Best practices for Import Set performance strongly recommends the usage of indexed fields
as coalesce fields. In an import, coalescing on a field (or set of fields) means the field will be
used as a unique key. If a match is found using the coalesce field, the existing record will be
updated with the information being imported. If a match is not found, then a new record will
be inserted into the database. If the indexes are missing, it can lead to poor performance
issues especially if large amount of data processing is involved.

107 . What if the coalesce fields are already indexed?

If at least one of the fields is fixed, no additional indexes are required. You will be notified
with Index already exist the fields are already indexed.

108 . Can we import the data periodically into target table?

Yes, we can schedule the periodic import to happen automatically.


109. What are Import Sets Sources?

CSV, EXCEL, XML, JDBC, HTTP/FTP

110 . Can we schedule multiple imports at the same time?

Do not schedule multiple imports at the same time. Running multiple imports concurrently
may negatively impact performance or cause an instance outage.

111 . What are the types of Transform Script Events?

onStart: executes at the start of an import before any rows are read
onAfter: executes at the end of a row transformation and after the source row has been
transformed into the target row and saved
onBefore: executes at the start of a row transformation and before the row is transformed
into the target row
onChoiceCreate: executes at the start of a choice value creation before the new
choice value is created
onComplete: executes at the end of an import after all rows are read and transformed
21

onForeigninsert: executes at the start of the creation of a related, referenced record before
the record is created
onReject: executes during foreign record or choice creation if the foreign record or choice is
rejected. The entire transformation row is not saved.

Update Sets
112 . What is an Update Set?

An Update Set is a group of configuration changes or customizations that can be used to


track all individual developer changes and moving changes from one instance to another
This feature will allow administrators to group a series of changes into a particular set and
then move them as a unit to other systems for Testing or Deployment purpose

113 . In which format are changes tracked for update sets?

An update set is an XML file that contains:

• A unique identifier for each set of record details.


• Groups of customizations or Configuration changes made to an instance.
• A state that defines whether another instance can retrieve and apply these
configuration changes.

114. Which table names are associated with update sets?

The tables associated with update sets in: ServiceNow typically include:

sys_update_set: This table stores the metadata about the update set, such as its name,
description, creator, and other related information.
sys_update_xml: This table contains the XML representation of the changes made within an
update set. It records the actual modifications to configuration items (CIs) or other elements
in the instance.
115. Could you please explain the Update Set process?

• Log in to your ServiceNow source instance using your credentials.


• In the navigation pane, go to "System Update Sets" under the "System Diagnostics
section.
• Open the update set record you want to modify by clicking on its name.
• Make the necessary changes to the update set. This can include adding, modifying,
or deleting records or configuration items.
• Once you have made the desired changes, click the "Save" button to save your
updates.
• If you are ready to move the changes to another instance, click the "Preview
Update" button to generate a preview of the update set
• Review the preview and make any additional modifications if needed.
• To move the changes to another instance, click the "Commit Update" button. This
22

• will start the process of moving the update set to the target instance.
• Monitor the progress of the update set as it gets applied to the target instance
• Once the update set is successfully applied, verify that the changes have been
implemented as expected.
• Remember to exercise caution when making changes to update sets, especially in
production instances, and always test your changes thoroughly in a non-production
environment before applying them to production.

116 . What does an update set capture and what doesn't it capture?

An update set captures configuration changes made within a specific instance of a platform,
such as ServiceNow. It includes various types of modifications, but there are certain
elements that it doesn't capture. Here's a breakdown

1.Scripts: Modifications to server-side scripts, client-side scripts, Ul policies, or Ul actions


2.UI Components: Changes to Ul pages, Ul macros, Ul Policy or Ul scripts.
3.Service Catalog: Updates to service catalog items, variables, and order guides.
4. Workflows: Modifications to workflows, workflow activities, and approvals.
5.Reports: Changes made to reports or report definitions.
6.Dashboards: Updates to dashboards, including the configuration, layout, and widgets.
7.Plugins: Activating, deactivating, or modifying plugins.
8.Configuration Items: Changes to configuration items, including creating, modifying, or
deleting them.
9. New Development: Any new applications, modules, or functionality created within the
instance.
10.Metadata Changes: Alterations to metadata, such as dictionary entries, Ul policies, and
ACLS (Access Control Lists).

While update sets are capable of capturing a diverse array of changes, there are certain
elements that they usually do not encompass. These elements include:

1. System Data: Update sets do not capture system-generated data or records created by
the system, such as logs or historical data.
2. Attachments: Files or attachments associated with records are not automatically included
in an update set. You would need to manually add them if required.
3. Scheduled Jobs: Any changes made to scheduled jobs or background processes are not
captured by default.
4. User Preferences: Personal user preferences or settings are not included in an update set.
5. Data: Update sets do not capture the actual data in the records. They focus on the
structural changes and configurations.

117. What precautions do we need to follow for update sets?


When dealing with update sets in ServiceNow, it becomes crucial to observe specific
precautions to guarantee a seamless and effective updating process. Here are some
precautions to bear in mind:
23

• Test in a non-production environment: Before applying an update set to a production


instance,
Review and verify changes: Before applying an update set,
• Rollback plan: Prepare a rollback plan in case there are issues or if you need to revert the
changes made by an update set.
• Apply update sets during maintenance windows: Schedule update sel deployments
during maintenance windows or periods of low user activity to minimize disruption.
• Don't complete default update sets
• Don't make any changes directly into XML file
• Communicate and coordinate with stakeholders: If you're working in a team or multiple
developers are involved, communicate and coordinate with your colleagues to avoid
conflicts or duplication of efforts. Maintain proper documentation and collaborate
effectively to ensure smooth collaboration.

118 . Is it possible to capture reports and dashboards using update sets?

Reports and dashboards are part of the application's data and are not directly captured in
update sets. However, there are other ways to migrate reports and dashboards between
instances, such as exporting and importing them as XML files or using other data migration
tools specific to reporting data
119 . What is a merge update set, and why is it important?

Merging update sets allows you to consolidate multiple sets of changes into one, simplifying
the deployment process. Instead of tracking and deploying each update set individually, you
can manage and apply a single update set, reducing the chances of errors or conflicts during
deployment.

120 . What are batch update sets in ServiceNow?

In ServiceNow, batch update sets refer to a feature that allows you to group multiple update
sets together and apply them as a batch during deployment. An update set represents a
collection of changes made to the configuration, customizations, or data within a
ServiceNow instance

Batch update sets provide a convenient way to manage and deploy multiple update sets
simultaneously, reducing the manual effort required for individual deployment. This feature
is particularly useful in scenarios where you have multiple sets of changes that need to be
deployed together or in a specific order.

121. What are remote update sets in ServiceNow?

Remote Update Sets in ServiceNow are a feature that allows users to transfer customization
changes between different ServiceNow instances. They enable the movement of update sets
from one instance to another, making it convenient to apply the same set of customizations
or configurations to multiple instances.

Remote Update Sets are commonly used in the following scenarios


24

• Development and Testing


• Upgrades
• Multi-Instance Environments
• Exporting Update Set
• Preview and Commit

122 .How many methods are available for migrating changes in ServiceNow?

Update Sets: Update sets are a native feature in ServiceNow that allow you to capture and
transfer changes between instances. You can create an update set in the source instance,
add the desired changes to it, and then export the update set as an XML file. This file can be
imported into the target instance, applying the changes.

Application Repository: ServiceNow provides an Application Repository that allows you to


package and distribute applications or bundles of changes.

Third-Party Migration Tools: There are third-party migration tools available that offer more
advanced features and capabilities for migrating changes between ServiceNow instances.

123. What precautions should be taken when deleting updates in ServiceNow?

Deleting an update set is not good practice. To revert a customization, back out the update
set rather than deleting it.
Administrators can delete an update set only when it is not the current update set and it is
empty (no sys_update_xml entries are associated with it). For example, after merging
update sets, you might want to delete the original sets. This function is restricted by an
access control rule (ACL) on the Update Set [sys_update_set] table. ServiceNow strongly
recommends that you do not delete sys_update_xml entries, because this action:

•Does not undo the updates.


•Removes any record of who applied the customizations.
•Removes the sys_update_xml entries associated with the update set, so
customizations are overwritten when the instance is upgraded
124 .What are the errors you have encountered in update sets?

I have encountered the below errors myself.

Missing Object:
Example problem text: Could not find a record in sys_ui_policy referenced in this update.

Collisions:
Example problem text: Found a local update that is newer than this one
Uncommitted update:
Example problem text: Could not find a table field (u_case.u_reference) referenced in this
update, but did find it in another uncommitted update sel
25

Table to be deleted has data:


Example problem text: Found a row in the table that is going to be deleted

Application scope validation issue:


Description: The previewer identifies the following combination of states as a problem:

Conflict within a single batch:


Example problem text. This update has conflicts within the update set with the same name,
Resolve the issue on the source system and re-preview or choose a specific update to use.

Service Catalog
125 . What is the Service Catalog?

In ServiceNow, the Service Catalog is a application that allows organizations to manage and
deliver various services to their users in a structured and user-friendly manner. It serves as a
centralized self-service portal where users can browse and request different types of
services, such as hardware provisioning, software installations, access requests, or service-
related inquiries

126 .Is it possible to create a new catalog in ServiceNow?

Yes, it is indeed possible to create a new catalog in ServiceNow. The Service Catalog in
ServiceNow allows you to manage and present various services, products, and offerings to
users in a structured manner. You can define different catalog items, such as service
requests, products, or offerings, and then group them into catalogs. This allows users to
easily request or access the items they need through a user-friendly interface.

127 . What is a Record Producer, and what is its purpose?

A record producer acts as a template or type of catalog item form that captures the
necessary information for a particular type of request. It presents a user-friendly interface
with fields and options relevant to the requested service. Users can enter the required
details, make selections, and provide additional information as needed
128. What is a Order Guide, and what is its use?

In ServiceNow, an Order Gulde is a feature that allows users to request bulk item in the
single request and manage a collection of related items or services as a single bundle or
package. It provides a structured way for users to select and order multiple items or services
together, streamlining the ordering process and ensuring consistency.

Dynamic and Conditional Options: Order Guides can offer dynamic options based on user
selections or conditions. For example, selecting a specific software option may trigger
additional choices related to licensing or configuration. This flexibility allows users to tailor
the bundle to their needs while ensuring accurate ordering
26

129 . What is Catalog UI Policy, and what is its purpose?

Catalog Ul Policy is similar to Ul Policy, With catalog Ul policies, we can configure specific
actions and conditions based on which variable should be displayed, required, or editable
to users when they are requesting items from the catalog. These policies enable you to
dynamically adjust the form's appearance and behavior based on various factors, such as
user roles, selected options, or the values of other fields.

130. What is a Variable Set, and what is its purpose?

Variable sets allow you to bundle related variables into a single container, making it easier to
manage and maintain catalog item forms. Instead of individually adding and configuring
each variable on a catalog item, you can add a variable set that includes all the necessary
variables at once.

131.What are catalog client scripts?

Catalog client scripts are scripts in ServiceNow that are specifically designed to run on the
client-side (in the user's web browser) when a user interacts with items in the service
catalog. These scripts are used to enhance and customize the behavior of catalog items and
the ordering process. The main purpose of catalog client scripts is to provide a dynamic and
interactive user experience. They can be used to perform various tasks, such as:

132 . What are the user criteria, and what is their importance?

In ServiceNow's Service Catalog module, "User Criteria" refers to a feature that allows
administrators to define conditions or criteria based on user attributes or roles. These
criteria are used to control the visibility and availability of catalog items, record producers
and order guides to specific users or groups.

133 . What is the variable attribute in the service catalog?

Service Catalog "Variable attributes" refer to the properties or characteristics associated


with variables defined within catalog items. These attributes provide additional information
about the variables and change their behavior and appearance on the catalog item form.

Variable attributes allow administrators to customize the behavior and presentation of


variables within the Service Catalog. Some common variable attributes include:

• glide_list
• max_file_size
• is_searchable_choice
• max_length
• max_unit
• no_filter

134 . What is the Catalog Builder in the Catalog item?


27

A catalog item refers to an individual product or service that is included in a catalog. It


represents a specific offering with its unique details, such as the product name, description,
pricing, and other relevant information.

Catalog builders typically include features that allow users to edit and manage catalog items
efficiently. These features may vary depending on the specific catalog builder software being
used. Here are some common functionalities you might find:

135. What is content item in service catalog?

A catalog item refers to an individual product or service that is included in a catalog. It


represents a specific offering with its unique details, such as the product name, description,
pricing, and other relevant information.

Catalog builders typically include features that allow users to edit and manage catalog items
efficiently. These features may vary depending on the specific catalog builder software being
used. OPBOM

Here are some common functionalities you might find:


Content items in the service catalog act as self-contained units that provide users with
information about the available services and allow them to request or order those services
as needed. This modular approach makes it easier for users to navigate and select the
services they require from the catalog.

136 . Difference between Catalog Item and Record Producer?


Catalog Item Record Producer
Record producers in Service-now allow users to
create task based records on any table directly from
A Catalog Item is a form used to submit the Service catalog interface. and we can map as
information, a request, or to create a task. well
Catalog Item will end up in opening a
request and request item and attaches a Record producer simply insert a record in the
workflow and catalog task, approvals selected table
Use catalog Item add multiple Items to cart Use Record producer it only creates a single record
and generate request and multiple RITM's. on target table

I would use a record producer when you want to


I would use a catalog item when you want gather some information using a form (variables)
to generate a request, complete with a but create some other type of record (incident,
workflow approvals, tasks, etc change, enhancement, etc.) as a result
Often a simple and straight, less
customization More customization options are available.

137 . Difference between Record Producer and Order Guide?


28

Record Producer: Record producer is type of catalog item In ServiceNow, a record producer
is a configurable feature that allows users to create new task based records or request
specific services using a guided interface. It enables users to fill out a form with predefined
fields and options, making it easier to capture and manage data consistently.

Order Guide: An order guide în ServiceNow is a functionality designed to simplify the


process of ordering multiple items or services. It provides a step-by-step interface that
guides users through the selection and configuration of various catalog items or service
offerings. Order guides can help users navigate complex ordering scenarios, ensuring they
select the appropriate items and providing clarity on dependencies or prerequisites.

138 . Explain the 3-record structure of Catalog Items?

• The top layer is your Service Request (Ex: REQ00001). You can relate it to your order
ID your in 1 go form e commerce website where you can order multiple things

• The second layer is RITM(Requested Item) (Ex: RITM0001)-> These are the individual
items ordered. There can be 1 or more items that can be part of 1 order.

• The third layer is catalog Catalog Task (sc_task) (Ex SCTASK00001) > These are the
tasks that individual teams do to fulfill 1 RITM

139 . What is the significance of the cascade variable in Order Guide?

Passing the Value: The selected value for the cascade variable is automatically passed to
that item. The subsequent catalog item can then use this value to determine its behavior,
options, or configuration.

140 . Types of Variables in Service Catalog?

Single Line Text, Multi Line Text, Container Start , Container Split , checkbox , Container
End , Break, Date , Date & Time ,Refference , Yes/No, Email,Duration, HTML
IP Address , List Collector , Lookup multiple choice, Lookup select box , Label ,
Multiple Choice , Select Box, Wide Single Line Text , Masked , Custom with Label

141. What is the role of regular expressions in the service catalog?

Regular expressions play a significant role in the service catalog by enabling pattern
matching and data validation. In the context of the service catalog, regular expressions are
used to define specific patterns or formats that input data must adhere to when users
interact with catalog items.
142 . What are the types of catalog client scripts?
The types of catalog client scripts include:

1) onLoad 2) onSubmit 3) onChange

143 . What is Reference Qualifier and Types ?


29

In ServiceNow, a reference qualifier is a powerful tool used to filter the available options in a
reference field. It allows you to define conditions that restrict the records displayed in a
reference field's choice list based on specific criteria.

1) Normal 2) Advanced 3) Dynamic

144.Diference between Catalog Item and Order Guide?

In ServiceNow, catalog items and order guides are two distinct components within the
Service Catalog that serve different purposes. Here are the differences between catalog
items and order guides:

Catalog Item:
Definition: A catalog item represents a specific service, product, or offering that users can
request through the Service Catalog. It is a self-contained unit that defines the details,
options, and workflows associated with a single item.

Order Guide:
Definition: An order guide is a collection or grouping of catalog items. It allows users to
select and order multiple catalog items together as part of a unified process or workflow

145 . Scenario: One user criterion has been added to both "Available For" and "Not
Available For." What would be the final result?

Item is not visible to the customer, because Not Available For overrides Available For

146 . What is domain separation for the service catalog?

Domain separation for the service catalog is a feature in ServiceNow that allows an
organization to create separate and independent virtual partitions, known as "domains,"
within the same ServiceNow instance. Each domain acts as a self-contained environment
with its own data, configurations, and user access controls. This separation ensures that data
and processes from one domain are isolated and cannot be accessed or viewed by users
from other domains.
The purpose of domain separation in the service catalog is to enable multi-tenancy and
support different business units, departments, of customer organizations within a single
ServiceNow instance. Each domain can have its own customized service catalog. workflows,
catalog items, and access controls.

Access Control List (ACL)


147. What is an Access Control List (ACL)?

In ServiceNow, ACL stands for Access Control List. An ACL is a security mechanism used to
control access to records and fields within the platform.
30

All access control list rules specify:

• The object and operation being secured


• The permissions required to access the object

148 . In how many ways can we apply ACL rules?

ACL rules can be applied in three ways in ServiceNow


1. Role Based, 2. Condition Based, 3. Script - Based

149. What are the types of ACLS in ServiceNow?

In ServiceNow, there are mainly two types of ACLs (Access Control Lists) Table Level and
Field Level

150 . Which role is needed to create new ACLs and update old rules?

security admin (Via Elavate Role)

151. What are the actions that we can restrict with ACLS?

With ACLS (Access Control Lists) in ServiceNow, you can restrict various actions on records
and fields. The actions that can be restricted with ACLs include.

1. Read: Restricting the ability to view or read records.


2. Write: Restricting the ability to modify or update records.
3. Create: Restricting the ability to create new records.
4. Delete: Restricting the ability to delete records.
5. Execute: Restricting the ability to execute certain actions or business rules.
6. Attach: Restricting the ability to attach files or documents to records.
7. Export: Restricting the ability to export data from records or tables.
8. Import: Restricting the ability to import data into records or tables.
9. UI Actions: Restricting the execution of specific Ul actions or buttons on the user interface
10. Field Level: Restricting the ability to view or modify specific fields within a record.

By carefully configuring ACLs, administrators can control user access to different parts of the
application, ensuring data security, privacy, and compliance with organizational policies.
152 . What is Admin Override in ACL?
31

Admin override is a powerful feature that is often reserved for trusted and highly privileged
users who need the ability to perform critical tasks and manage the system without being
limited by standard access controls. It is important to use this capability judiciously and
restrict it only to authorized personnel to prevent potential misuse.

153 . What is the order of ACL execution?


ACL (Access Control List) order refers to the sequence in which ACL rules are evaluated and
applied in ServiceNow.
Role---->Condition----->Scripting

154 . What do "Table" and "None" refer to?

By combining these two options with other conditions and permissions in ACL rules,
administrators can effectively manage and control access to records and fields in
ServiceNow, ensuring appropriate levels of security and data integrity within the platform.
This rule can apply for all records in table (Ex. Incident. All records)

155 . What do "Table" and "*" refer to?


This rule can apply to specific table and all(*) fields
156 . What do "*" and "*" refer to?
This rule can apply to all tables and all fields
157. What do "*" and "Nn" refer None
This rule can apply to all tables and all records
158 .If we have ACL to make field read only and we have UI Policy to make it editable,
what would be the result?

A Field will still be read only. It doesn't matter if Ul policy or Client script is making it
editable, user has to pass ACL rules to gain edit access.

159. Read, write, delete, create which one executes first ?

Read: The "read" permission is typically evaluated and executed first


Write: The "write" permission is evaluated and executed after the read permission.
Delete: The "delete" permission is evaluated and executed after the write permission
Create: The "create" permission is evaluated and executed separately when a new record is
being created.

160 . What is a notification, and why is it used?

A notification in ServiceNow is a message alert mechanism used to inform users or groups


about specific events, tasks, or updates within the system.
161 .In how many ways notifications can be triggered?

1.It can be triggered on insertion or update of a record.


2.It can be triggered through events using gs.eventQueue method.
3.It can be triggered Through Flow Designer.
32

4. Through workflow by using event activity or notification can be configured in workflow


itself.
5.it can also be send through Scheduled Jobs.

162 . How can you call an email script in the notification body?
We can use below syntax in notification body ${mail_script:mail_script_name}
163 .Can we send email notification via workflow and flow?
Yes, you can send email notifications using both workflows and flows via event activity.
164 . How can you send email notifications through a Business Rule?
We can use below syntax:
gs.eventQueue('eventname', current, param1, 'param2'

165 .How do I add recipients to the CC and BCC fields in a notification?

We can use below syntax in notification body:


Ex: email.addAddress('cc','srinivas.s@gauthamit.com','Srinivas Sunkara')
Ex: email.addAddress("bcc','satya.s@gauthamit.com, 'Satya Sunkara')

166 . What is an email layout in notifications?


Email layout is reusable template which can be used in multiple notifications.
167 .What is the purpose of the "Allow Digest" checkbox in a notification?
The "Allow Digest" checkbox in a notification refers to a feature that allows recipients to
receive a summary or compilation of multiple notifications in a single digest format.

The purpose of the "Allow Digest" feature is to help manage and reduce the volume of
notifications that recipients receive.
168 .What is watermark in Notification and why it is used?

By default, the system generates a watermark label at the bottom of each notification email
to allow matching incoming email to existing records. Each watermark includes a random 20-
character string that makes it unique.

169. What does weight field do in Notification?

The "Weight" field in a notification refers to a numerical value assigned to determine the
priority or importance of the notification

170 .If we create a notification using an email template that includes its own subject and
body, and the notification itself also has a subject and body, which one takes priority?
In ServiceNow, if a notification is created using an email template with its own subject and
body, and the notification also has its own subject and body, the subject and body defined
within the notification itself will take priority over those from the email template.

171. What is a push notification in ServiceNow?

n ServiceNow, push notifications are a type of notification that allows you to send real- time
updates and alerts to users on their mobile devices. They provide a way to proactively
33

deliver important information or notifications to users, even when they are not actively
using the ServiceNow platform. Here are key points about push notifications in ServiceNow:

By leveraging push notifications in ServiceNow, organizations can improve communication,


enhance user engagement, and ensure that users receive important updates in a timely
manner, regardless of their device or location.
172 .What role does the 'Importance' field play in ServiceNow notifications, and how does
it assist both senders and recipients in managing the urgency of messages?

The "Importance" field in ServiceNow notifications holds significance as it allows users to


prioritize the urgency of the notification. When sending a notification, the Importance field
lets the sender indicate the level of importance or urgency associated with the message.
This helps recipients to quickly understand the criticality of the notification and respond
accordingly.
The Importance field typically offers different options to choose from, such as:
1. High: Indicates a critical notification that requires immediate attention and action.
2. Medium: Represents a moderately important notification that needs attention but may
not be as urgent as a 'High' priority notification.
3. Low: Denotes a notification with lower priority, often used for informational or non-
critical updates.
173 .What is a Workflow, and what is its importance?

A workflow refers to a series of predefined tasks, activities, or steps that are organized in a
logical sequence to achieve a specific goal or outcome. It provides a structured and
automated way to streamline and manage business processes within an organization.
Here's the importance of workflows:
• Process Efficiency
• Consistency and Compliance
• Task Prioritization and Deadlines:
 Transparency and Reporting
 Customer Satisfaction

174 .How do you pass data from the main workflow to a sub workflow?
Configure the subflow to accept variables from the parent workflow by defining the inputs.

• Include the subflow in the parent workflow and connect the inputs to the parent
workflow variables

175 .Tell me some core activities in workflow editor?


Find some core activities mentioned below
Approval , Notification, Timer, Condition, Task ,Utility, Etc...

176.How to pass data from one activity to other activity?

By using workflow.scratchpad object

e.g. Store value in one activity as below, workflow.scratchpad.myVariable = 'Hello, Srinivas';


34

Access it in another activity as below, var myValue workflow.scratchpad.myVariable,

177 . What is the importance of Rollback activity?

The Rollback activity is a crucial component of workflow design, serving as a safety


mechanism to handle errors and ensure data integrity. It allows the designer to reverse the
effects of the workflow in the event of errors or exceptions. The Workflow Editor allows the
designer to roll back the workflow and restarts at different points of a process.

If there are Approvals in the rollback path, they will be set to Not Yet Requested, even If they
had been previously approved.

178 . How to avoid workflow going into infinite loop?

Define clear exit conditions within your workflow logic. These conditions should be based on
specific criteria or thresholds that, once met, will break the loop and terminate the
workflow. Make sure to incorporate these exit conditions at strategic points within the
workflow to prevent it from endlessly repeating.

179 .Scenario: How can you configure approvals to work in a manner where the request is
approved if more than 50 percent of approvers have approved it, and vice versa?

You can write below script in approval activity as below to identify if 50% approvals are
approved or 50% are rejected based on result take action.

Approval activity script: //Approve based on percentage indicated

var approve Percent = 50;


if ((counts.approved / counts.total)*100 >= approve Percent){
answer 'approved';
}
if ((counts.rejected / counts.total)+100 > (100 - approve Percent)){
answer = 'rejected';}

180 . How do you retrieve values from a Sub flow to the main flow?

We can use the Return Value activity in the Sub flow to return values to the parent
workflow.

181 . How do you cancel a workflow in ServiceNow?

cancelContext(context)

182 . What is Flow Designer?


Flow Designer is a powerful tool provided by ServiceNow that allows users to design and
create automated workflows with ease. It is a low-code/no-code visual development
35

platform that enables users to automate processes, integrate systems, and orchestrate
actions across various applications and services.

With Flow Designer, users can visually design workflows by dragging and dropping flow
elements onto a canvas and configuring their behavior. These flow elements include triggers,
conditions, actions, subflows, and approvals. Users can connect these elements to define the
sequence of steps and the logic for each step in the workflow

183. What is the importance of Flow Designer?


Streamlined Workflow Automation: Flow Designer allows organizations to automate and
streamline their workflows, reducing manual effort and increasing operational efficiency. It
provides a visual and intuitive interface for designing workflows, making it accessible to both
technical and non-technical users.

184 .What are the advantages of Flow Designer?


Flow Designer reduces scripting so it can be understood and created easily by the non-
technical user. The same end functionality can be tackled by both, but you're going to find
Flow Designer a lot easier to use.

185. What is the difference between workflow and Flow Designer?


Workflow Flow Designer
If the process requires complicated or Process owners need to use natural language and
scripted logic, it can be written in a low code way to automate approvals, task,
Workflow and calledfrom a flow notifications
Changing logic already developed using New logic needs to be developed and it has not
Workflows. been created in workflow.
SLA timer is required. SLA timer not required
Steps required do not exist yet in Flow
Designer and require unsupported Business logic needs to use the library of reusable
protocols actions across multiple flows.
Not Follow NLU Model Follow NLU Model
Integrtaion HUB not available Integration HUB Avalable

186 .Can we convert a Workflow to Flow Designer?

Converting a workflow to Flow Designer would typically involve redesigning and


reimplementing the workflow using the visual and low-code/no-code capabilities of Flow
Designer. While there is no direct automated conversion process, you can follow these
general steps to transition from a traditional workflow to a Flow Designer workflow:

187 . What is workflow versioning in ServiceNow?

In ServiceNow, workflow versioning refers to the practice of managing and tracking different
versions of a workflow. When you make changes to an existing workflow, such as modifying
the steps, conditions, or actions, you have the option to save it as a new version instead of
36

overwriting the current one. This allows you to maintain a history of the changes made to
the workflow over time.

188. Can we send email notification via workflow?


Yes, it is possible to send email notifications via a workflow. Workflows can include steps
that trigger the sending of email notifications to designated recipients. Here's a general
outline of how you can incorporate email notifications into a workflow:
gs.eventQueue('Eventname', current, 'Param1', 'Param2')

189 .Can you provide an overview of the architecture of Flow Designer?

 1. Process The flow trigger or API call


 2. Process the events in the queue
 3. Build the process plan
 4. Run the process plan
 5. Store the flow execution details

190 . What is the importance of the approval coordinator?


The approval coordinator plays a crucial role in the workflow process, particularly in
scenarios where approvals are required at different stages. Their importance lies in
managing and overseeing the approval tasks within the workflow to ensure smooth and
efficient processing of requests or changes.
191 . What is a scheduled workflow in ServiceNow?

A scheduled workflow in ServiceNow refers to an automated process or series of actions


that are executed at predetermined intervals or specific times. It allows users to automate
tasks, notifications, approvals, or other activities within the ServiceNow platform. These
workflows can be configured to run regularly, such as daily, weekly, or monthly, or they can
be set to trigger at specific dates and times.
Scheduled workflows are valuable for streamlining repetitive tasks, ensuring timely updates
or notifications, and improving overall efficiency in ServiceNow. They play a crucial role in
automating routine processes and reducing the need for manual intervention, thereby
saving time and effort for users.

192 . What is the workflow context in ServiceNow?


In ServiceNow, the workflow context refers to the set of variables, data, and states
associated with a specific instance of a workflow or process. It provides the necessary
information and context for the workflow engine to execute the defined sequence of actions
or tasks.

193. What is the maximum activity count limit in the workflow, and how can the limit be
changed?
The maximum count limit is 100. If you wish to add more activities, you can change the
number accordingly.
194. What is a timer activity, and what does it do?
IA timer activity is a component used in workflow automation and business processes. It
serves as a time-based trigger in a workflow, enabling the automation of actions or tasks
37

based on specific time intervals or scheduled events. When a timer activity is reached in the
workflow execution, it initiates the defined actions or transitions to subsequent stages based
on the configured time criteria.f a workflow or process. It provides the necessary
information and context for the workflow engine to execute the defined sequence of actions
or tasks.

195 . Difference between Approval user and Approval group in workflow?


The main difference between an approval user and an approval group lies in the way
approvals are assigned and managed in a workflow or business process.

Approval User:
• An approval user refers to an individual user who is responsible for granting approval
for a particular task or process in the workflow.
• When an approval user is assigned to an approval step, that specific user will receive
the approval request, and they have the authority to approve or reject it.
• This approach is suitable when a specific person or a limited number of individuals
need to review and authorize a task or decision.

Approval Group:
• An approval group refers to a collection of multiple users who share the
responsibility for granting approval in a workflow.
• When an approval group is assigned to an approval step, any member of that group
can review and approve the request.
• This approach is useful when there is a need for collective decision-making or when
multiple individuals have the authority to approve a task, and any one of them can
provide the necessary approval.

Client Scripts
196 . What is a Client Script, and what are the types of Client Scripts?

Client scripts are a type of scripting used in the ServiceNow platform to execute code on the
client-side (i.e., within the user's browser) to enhance the user experience and perform
specific actions. They are written in JavaScript and can be used to modify form fields,
validate data, create dynamic Ul elements, and interact with server-side scripts

There are four types of client scripts in ServiceNow:


1. OnLoad: Onload client scripts execute when a form is loaded. They are used to pre-
populate fields, hide/show form elements, or perform any necessary actions when a form is
opened.
2. OnChange: OnChange client scripts trigger when the value of a form field changes. They
are used to validate input, calculate values based on user input, or dynamically update other
fields on the form.
3. OnSubmit: These client scripts run when a form is submitted. They are used to perform
final data validation, show confirmation messages, or execute additional actions before
saving the data
38

4. OnCellEdit: These client scripts run when a cell is edited on the list view of a table This is
the only client script type that does not run on the form view of a table. This type of client
script is helpful to ensure that the rules you want to stick to are also enforced on list views of
a table.

197.Can you provide the parameters used in an onChange client script?


In an onChange client script, the following parameters are available:

• control
• oldValue
• newValue
• isLoading
• is Template
Script:
function onChange contral, oldValue, newvelue, isleading, isTemplate)
if (istoading !! new value "")
return;
}
//Type appropriate comment here, and begin script belo

198 .How can I allow a user to update the incident state but restrict closing it in list view?
Alternatively, could you explain the use case of a cell edit client script with a real-time
example?

The OnCellEdit client script runs when the user updates record via list view.

Example: User shouldn't be able to close the incident through list view. Below is an example
client script which checks if new state value is closed,
Script:

Function onCellEdit (sys IDs, table, oldValues, newWalue, callhack)


{ var saveAndClose true;

if (newWalue== 7) {

alert("You should not clase incident from list việw");


saveAndClose- false;
)else {
saveAndClose =true;
callback(saveAndClose);
}
199. Can we execute an onChange client script during form load? If yes, then how?
In ServiceNow, the onchange client script is designed to execute when a specific field on a
form is changed by the user. It is not meant to execute automatically during form load.
However, you can achieve a similar effect by calling the onchange event programmatically
when the form loads.
39

Note: Basically 'isLoading' is the variable which keeps track whether current operation is
onLoad or not, we can use the same variable to execute it on change or on load based on
the requirement.
200 . What is the order of execution between UI policy and Client script?
The order of execution between UI Policies and Client Scripts is as follows:

1. Client Script (onChange, onLoad, etc):


• Client Scripts are executed first when a form loads or when specific field events (e.g.,
onChange) occur.

• These scripts run on the client-side (browser) and can perform various actions,
validations, or modifications to form elements.
2. UI Policy:
• o. After the Client Scripts have executed, UI Policies are applied to the form.

• Ul Policies are used to dynamically set field attributes, such as read-only, mandatory,
or visibility, based on defined conditions.

Note: UI Policies execute after Client Scripts. If there is conflicting logic between a Client
Script and a UI Policy, the UI Policy logic applies

201 . How can form submission be prevented using client- side scripting?

We can use "return false" statement in onSubmit client script to prevent form submission.

202. Which Glide APIs can we use in client scripts?


In client scripts within the ServiceNow platform, you can use the following Glide APIs.

• Glide Form API(g_form)


• Glide User API(g_user)
• Glide Ajax API(GlideAjax)
• Glide Dialog Window
• Glide List

203 . When should we use Client scripts, and when should we use Ul policies?
Both client scripts and Ul policies are used for different purposes in ServiceNow, and
understanding when to use each can help you build more efficient.
Client Scripts:
Client scripts in ServiceNow are used to run JavaScript code on the client-side (1.e., in the
user's browser). They allow you to enhance the behavior of forms and fields, customize user
interactions, and perform client-side data validation.
Ul Policies:
Ul policies, on the other hand, are a way to control the visibility and read-only behavior of
form elements based on specified conditions. They allow you to make specific form fields
read-only, mandatory, or hidden based on data conditions.

204 . Can we create a client script for a specific view?


40

Yes, in ServiceNow, you can create a client script that is specific to a particular view. By doing
so, you can control the behavior of the elements on that specific view without affecting
other views in the application. This allows for more granular control and customization
based on the needs of each view

205 . What are the differences between UI policies and Client scripts in ServiceNow?
UI Policy Client Scripts
UI Policies are used to control the behavior
and visibility of form elements (fields) on a Client Scripts are used to run custom
ServiceNow form based on specified JavaScript code on the client-side (i.e., in the
conditions user's browser).
It will allow you to enhance the behavior of
forms, validate data input, auto- populate
It will allow you to make fields read- only, fields, show/hide fields based on user
mandatory, or hidden dynamically, depending interactions, and perform various other client-
on data conditions. side actions.
Client Scripts can be applied to specific forms,
these are primarily focused on controlling lists, or views and can interact with multiple
individual field behavior. fields on the form.
UI Policies are often simpler to configure and
manage, especially for basic conditional field Client Scripts are more versatile and can
behavior. They are well-suited for controlling handle complex logic and interactions on the
field properties based on simple conditions. client-side.
Client Scripts can be configured to run at
UI Policies are evaluated and applied when a different points, such as when a form is
form is loaded or when a field's value changes. loaded, saved, or when a field is modified.
UI Policies are more focused on declarative
configuration. You set up conditions and Client Scripts are more focused on allowing
actions through the ServiceNow Ul without you to write custom JavaScript code to
writing custom code. implement specific functionalities.
They automatically enforce the specified They allow you to control the timing of their
conditions without any additional action from execution to respond to various user
the user. interactions.

206 . What is the purpose of the "Isolate script" checkbox in client scripts?
The Isolate Script checkbox in ServiceNow client scripts is used to enable strict mode
for the script. When this checkbox is checked, the script runs in strict mode, which
has several important implications
41

One Word Answer :


This button is used to disable strict mode and direct DOM access for a client script
Here's what the "Isolate script" checkbox does:
• Isolated Scope
• Minimizing Conflicts
• Better Modularity
• Scoped Execution

207. What is the g_form object, and what are ten of its methods along with their usage?

In ServiceNow, the g_form object is a client-side JavaScript object that provides a set of
methods to interact with and manipulate the current form on the user interface.
Here are 10 commonly used methods of the g_form object along with their usage:
• g..form.getValue('fieldName')
• g_form.setValue('FieldName','Value')
• g_form.addOption('FieldName,'Value')
• g_form.setDisabled('FieldName', Boolean)
• g_form.setMandatory('FieldName', Boolean)
• g_form.setReadonly('FieldName', Boolean)
• g_form.setDisplay('FieldName', Boolean)
• g_form.setVisible('FieldName', Boolean)
• g_form.addDecoration ('FieldName', Boolean)
• g_form addInfoMessage("Add your message')
• g_form.addErrorMessage('Add your message')
• g_form showFieldMessage("FieldName', Boolean)

208 . What are the best practices we should follow for client- side scripting?

When it comes to best practices for client-side development in ServiceNow, the following
guidelines can help ensure efficient and maintainable code.
• Client-Side Validation
• Use Client Scripts Sparingly
• Leverage UI Policies
• Avoid Global Scoped Variables
• Use GlideAjax for Server-Side Communication
• Optimize Queries
• Minimize Use of 'GlideSystem' API
• Consolidate Scripts
• Minimize DOM Manipulation
• Regularly Review and Refactor Code

209 . Can we execute a client script on the server-side?


No, client-side scripts cannot be directly executed on the server-side in the ServiceNow
platform. Client-side scripts run on the client's web browser and are used to provide a
responsive and interactive user experience by manipulating the user interface and handling
user interactions.
Note: onCellEdit can run on server side(List View)
42

210 . How do you debug client scripts in ServiceNow? Can you explain the techniques or
tools you would use?

In ServiceNow, debugging client-side scripts is essential for identifying and resolving issues
with your code. There are several techniques and tools you can use to debug client scripts
effectively:

You can access them by right-clicking on the page, selecting "Inspect" or "Inspect Element,"
and navigating to the "Console" tab. The console will display any JavaScript errors or log
messages you add to your code using console.log().

211 . Can you invoke a business rule using a client script?

No, you cannot call BR from client script. However, you can write Display BR to store values
in g_scratchpad object and access that object in client script.

212 . What are the differences between Client Scripts and Catalog Client Scripts?
Client Scripts Catalog Client Scripts
Client Scripts are used to add custom
JavaScript logic to any form or list view
ServiceNow, regardless of whether it's
related to a catalog item or any other Catalog Client Scripts, on the other hand, are
record type. specific to the Service Catalog in ServiceNow.
They can be used on various record types They are used to add custom JavaScript logic to the
like Incident, Change Request, Problem, items in the Service Catalog, which includes any
etc., to customize the behavior of the form requested service or product available in the
or list view. catalog.
Client Scripts can run on both the form load
and field change events, allowing you to
control the user interface, perform
validation, and manipulate data in real- Catalog Client Scripts run on the item's form and
time. are used to enhance the user
We have 4 types of client scripts, onLoad, We have 3 types catalog client scripts, onLoad,
onSubmit, onChange, on CellEdit onSubmit, onChange

213. What is the importance of the "inherit" checkbox in client scripts?

In ServiceNow, the Inherit checkbox in client scripts allows the script to be inherited
by tables that extend from the table on which the script is defined. This means that if
you create a client script on a parent table, such as the Task table, it can be
automatically applied to all child tables that extend from it, like Incident, Change,
and Problem tables

One Word Answer :


It Indicates whether the client script applies to extended tables.
43

For example, consider a scenario where you have a form with multiple input fields, and you
want to apply certain settings or values from one field to another. The "inherit" checkbox
would enable this functionality.
214 . Can you please explain one complex scenario that you have implemented in your
current project?
Sure, let's consider a complex client script for a web application that involves a requirement
to dynamically generate a unique username based on a user's first name and last name.

Requirement: When a user fills out a registration form with their first name and last name,
the system should automatically generate a unique username by concatenating the first
three letters of their first name with the last four letters of their last name. If the generated
username already exists in the system, the script should add a numeric suffix to make it
unique.

215. How many client scripts have you created in your current project?
I had created 35 to 40 client scripts in my current project

Business Rules
216 . What is Business Rules Types Of Business Rules In ServiceNow ?
Simple Definition :
Business Rules are a powerful tool in ServiceNow, allowing you to automate complex
processes and ensure data

Business Rules in ServiceNow are server-side scripts that execute when a record is
displayed, inserted, updated, or deleted, or when a table is queried. They are used to
automate processes and ensure data consistency within the platform.

Types of Business Rules in ServiceNow


1. Before Business Rules :
o Execute before a record is saved to the database.
o Commonly used to validate data or modify values before they are saved.

2. After Business Rules :


o Execute after a record is saved to the database.
o Often used to update related records or trigger additional processes.

3. Async Business Rules :


o Execute after a record is saved, but run asynchronously.
o Useful for processes that do not need to complete immediately, helping to
improve performance.

4. Display Business Rules :


o Execute when a record is displayed to the user.
o Typically used to modify the data being displayed or to set up data for client-side
scripts.

Example Use Cases


Before Business Rule : Validate that a field is not empty before saving a record.
After Business Rule : Update a related record when a change is made to the
current record.
Async Business Rule : Send an email notification after a record is updated.
44

Display Business Rule : Pre-fill a form field with data when the form is loaded.

Before Business Rule:


Scenario: In an Inventory Management system, when a new "Purchase Request" record is
created, a before business rule is used to set the "Request Status field to "Pending Approval"
by default, ensuring that all new requests go through the approval process.
After Business Rule:
Scenario: In a Customer Support system, when a support ticket is resolved, an after business
rule is employed to automatically send a customer satisfaction survey to the ticket requester,
allowing them to provide feedback on their support experience.
Asynchronous Business Rule:
Scenario: An e-commerce platform wants to implement an automated process for handling
customer reviews and ratings. When a customer submits a review for a product, the
platform needs to calculate the average rating for the product and update the product's
overall rating. Additionally, it wants to send a thank-you email to the customer for their
review.
Display Business Rules:
Scenario: In an incident management system, there are two types of incidents. "Software
Issue" and "Hardware Issue." For the "Software Issue" category, an additional field called
"Software Version" needs to be displayed, while for the "Hardware Issue" category, this field
is irrelevant and should not be shown.

218. What is the difference between After Business Rule and Async Business Rule?
After Business Rules Async Business Rule
After business rules are executed after a Async business rules, short for asynchronous
record has been inserted, updated, business rules, are executed in the background,
deleted, or queried but before the separate from the immediate user interface
response is sent back to the user interface. response cycle.
Synchronous Execution: After business
Asynchronous Execution Async business rules are
rules are executed synchronously,
executed asynchronously, which means they do
meaning they are part of the immediate
not impact the immediate response time of the
transaction and response cycle. They are
user interface. Instead, they run in the background
executed in real time and can impact the
after the initial transaction has been completed.
user interfaces responses time.
sync business rules are typically used for more
After business rules are best sulted for
time-consuming or complex operations that do not
actions that need to be performed
need to be completed immediately while the user
immediately after a record's modification.
is interacting with the application.
219. What is the difference between Before and After Business Rules?

Before Business Rules:


Timing: Before business rules are executed before a record is inserted or updated in the
database.
Purpose: These rules are used to perform actions or validations before the data is saved to
the database. They can modify field values, enforce data integrity, perform calculations, or
set default values.
45

Synchronous Execution: Before business rules execute synchronously, which means they are
part of the immediate transaction and response cycle. Any changes made by these rules are
included in the record being saved.
Use Case: Before business rules are often used when you need to validate or modify data
based on certain conditions before the record is committed to the database. For example,
you can use a before business rule to check if all required fields are filled before saving a
new record.

After Business Rules:


Timing: After business rules are executed after a record is inserted, updated, deleted, or
queried but before the response is sent back to the user interface.
Purpose: These rules are used to perform actions or validations after the data has been
saved to the database. They can update related records, send notifications, or perform other
post-processing tasks.
Synchronous Execution: After business rules execute synchronously, meaning they are part
of the immediate transaction and response cycle. However, they do not affect the data being
saved, their actions occur after the data has been committed.
Use Case: After business rules are suitable for tasks that need to be performed immediately
after a record's modification. For example, you can use an after business rule to send an
email notification to a user when a new record is created.
220 . What is a Display Business Rule?
A "Display Business Rule" is a type of business rule used in ServiceNow or similar systems to
control the visibility and display behavior of fields on a form or a list.

221 . What is a Query Business Rule?


A Query Business Rule in ServiceNow is a server-side script that is executed when a query is
made to retrieve records from the database. This script runs before the database query is
executed, allowing you to modify the conditions of the query or enforce additional logic
based on certain criteria. The primary purpose of a Query Business Rule is to control and
manipulate the data retrieved from the database based on specific conditions or
requirements.

222 .What is the difference between Query Business Rule and Access Control List (ACL)?

Query Business Rule: A query business rule, often referred to simply as a "business
rule, is a specific condition or constraint applied to data queries in a software system. It is a
part of the business logic that determines how data should be accessed, manipulated, or
presented based on predefined rules. These rules are typically defined by the business or
application requirements.
ACL (Access Control List): An ACL (Access Control List) is a mechanism used tomanage
permissions and control access to resources in a system. It is a list of permissions associated
with each user or group of users. ACLs are commonly used in operating systems, networks,
and applications to specify who can access specific files, folders, or functionalities.

223 . How can email notifications be triggered through Business Rules?


We can use this syntax gs.eventQueue method to trigger email notification through business
rule.
46

Syntax: gs.eventQueue('event_name', current,'param1','param2');

224 .What are the benefits of using Display Business Rules?

Simplicity: Display BRs are easy to set up within ServiceNow, and you can quickly define the
calculation logic using server-side JavaScript.
Automatic Updates: The Total field will update automatically without the need for any user
action, providing a smoother user experience.
Real-time Calculations: As the Display BR executes immediately when the dependent fields
change, the Total value will reflect the most up-to-date calculation without any delays.
225 .What is the main object in Display Business Rules?
g_scratchpad is main object in display business rule.
226 . Can we run a business rule on the client side?
Yes, we can run a business rule on client side through Display Business Rule.
227. How can you identify if the current operation is an insert, update, or delete in
Business Rules?
We can use current.operation() in BR. Depending on current operation, it returns update,
delete or insert value.
228 . How can you prevent form submission via Business Rule?
We can use 'current.setAbortAction(true)' in Business Rule script to abort action. This will
stop data updation in database.

229 . What are the different objects accessible in Business Rules (BR)?

In Business Rules (BR), various objects are accessible to interact with the underlying data
and system. Some of the commonly accessible objects include:
Current, Previous, gs, g_scratchpad
Note: Previous object is null in Async BR, as there could be multiple updates on same record
while BR is in queue for execution which might create conflict on which version

230 . What are the actions that we can perform in a Business Rule?
Here's a summary of the actions available to you.
insert, update, query, delete.
231. Which type of Business Rule should not include "current.update()" and why?

Infinite Loop: When you use "current.update()" in a "before" Business Rule, it triggers the
same Business Rule to run again, leading to an infinite loop. This is because the "before"
Business Rule executes before the actual database operation (Insert or update) takes place.
If the Business Rule modifies the "current" record and then updates it again, the same
"before" Business Rule will run again, leading to an endless loop.
Performance Impact: The infinite loop caused by "current.update()" can significantly impact
system performance and slow down transaction processing. As the loop continues
indefinitely, it consumes system resources and causes excessive database queries.

232 . Can we run a scheduled job from a Business Rule?


47

No, we cannot directly run a scheduled job from a Business Rule (BR) in ServiceNow.
Scheduled jobs are separate entities in ServiceNow that are designed to run at specific
intervals or times, independent of Business Rules.
Use Script Include: If the functionality you want to run as a scheduled job is encapsulated
within a reusable script, you can create a Script Include and then call its functions both in
the scheduled job and the Business Rule.
Call Scheduled Job API: In the Business Rule, you can use server-side JavaScript to call the
Scheduled Job API (GlideSchedule API) and trigger the execution of a specific scheduled job
programmatically.

233. How do you debug Business rules ? what are the different ways to debug Business
Rules?
To debug Business Rules (BR) in ServiceNow, you can employ various methods to identify
and troubleshoot issues in your scripts. Here are different ways to debug BRs.

System Logs: You can use the "gs.log()" and "gs.error()" methods to write messages to the
system log.
For client-side Business Rules (when running on the browser), you can use the browser's
developer console to log messages using "console.log()"
Debugging Alerts: In client-side Business Rules, you can use "alert()" statements to display
messages in a pop-up dialog.
Try-Catch Blocks: Use try-catch blocks in your scripts to catch exceptions and log relevant
information about the error to the system log or a specific field. This helps you handle errors
gracefully and understand why they occurred.

234 .What role do web services play in Business Rules?

In Business Rules, you can use web services to interact with external systems or perform
operations on remote servers. Web services allow you to communicate with other
applications over the internet using standard protocols like SOAP
(Simple Object Access Protocol) or REST (Representational State Transfer).
By incorporating web service calls within Business Rules, you can extend the capabilities of
your ServiceNow instance and integrate it with various external systems or services. For
example, you could use a Business Rule to trigger a web service call when a specific
condition is met, sending data from ServiceNow to an external API, or retrieve data from an
external service and update records in servicenow based on the response

235. In ServiceNow, what is the order of execution for Business Rules (BR), Access Control
Rules (ACL), Client Scripts (CS), and UI Policies?

The typical order of execution is as follows:


1. Business Rules (BR) - Server-side processing.
2. Access Control Rules (ACL) - Server-side processing.
3. Client Scripts (CS) - Client-side processing (after the form is loaded or modified).
4. UI Policies - Client-side processing (after the form is loaded).
48

It's essential to understand the order of execution to design and implement these
components effectively, ensuring they interact properly and achieve the desired outcomes in
ServiceNow.

236 . What are Global Business Rules?


Global Business Rules in ServiceNow are a type of server-side script that allows you to define
reusable business logic or conditions that apply across the entire platform. As the name
suggests, these rules are "global" because they are not specific to any particular table or
record but can impact multiple tables and records within the ServiceNow instance.

237 . How many business rules have you implemented in your current project?
I have implemented total 65 business rules in my current project.
238 . What is the Order of execution of business rules?

Execution order of business rules are:


• Query
• Display
• Before
• After

239 .What are the best practices for business rules?

Best practices for business rules aim to ensure that they are effectively designed, managed,
and maintained to support the organization's objectives and decision-making processes.
Here are some key best practices for business rules:

Clear and Understandable Language: Write business rules using clear, concise, and easily
understandable language. Avoid technical jargon or ambiguous terms to minimize confusion
and misinterpretation.
Documentation: Document each business rule thoroughly, including its purpose, conditions,
actions, and any dependencies.
Separation of Business Rules from Code: Separate business rules from the application code.
This helps maintain a clear distinction between business logic and technical implementation,
making it easier to modify rules without affecting the codebase.
Version Control: Implement version control for business rules to track changes and maintain
a historical record.
Rule Governance: Establish a governance framework for business rules to manage their
lifecycle, ownership, and approval processes.
Scalability and Performance Considerations: Design business rules with scalability and
performance in mind. Ensure that the rule execution process remains efficient, even as the
number of rules and data volume increases.

UI Actions
240. What is an UI Action?
49

Ul Action is a configurable element that appears on forms and lists, allowing users to
perform specific actions or tasks. UI Actions enhance the user interface and provide a way to
initiate custom actions or standard operations on records within the platform. They can be
seen as buttons or links placed strategically to improve user experience.

241. What is the purpose of 'gsftsubmit' in a UI action?


In ServiceNow, gsftsubmit is a special client-side function used in UI Actions to trigger the
submission of a form on a record. When this function is called within a Ul Action, it simulates
the user clicking the "Submit" button on the form, causing the form data to be saved and
processed by the system.
Here are some key points about gsftsubmit
Usage: gsftsubmit is typically used in client-side scripts of Ul Actions that need to save the
current form's data and trigger any associated Business Rules, Script Includes, or other
server-side logic.
242. What is the syntax of the gsftsubmit function?
Here is an example of how gsftsubmit is used in a Ul Action's client-side script:
gsftSubmit(null, g_form.getFormElement(), "Ul action_name')

243 . Can we run a Ul action on the client-side?

Yes, we can run a Ul action on the client-side in ServiceNow.


In ServiceNow, Ul actions can be configured to run on either the client-side or the server-
side. When a Ul action is set to run on the client-side, it means that the associated script will
execute directly in the user's web browser, without the need for a server request.

244. What are some UI Action controls in ServiceNow?


You can create a Ul action to provide any of these controls:

 A button on a form.
 A context menu item on a form that appears when you open the form context menu
or right-click the form header.
 A related link in a form.
 A button in the banner on top of a list.
• A button at the bottom of a list
 A context menu item on a list that appears when you open the list context menu or
 right-click the list header.
 A menu item for the action choice list at the bottom of a list.
• A related link at the bottom of a list
245. How can I write both server-side and client-side code in a UI Action?

function resolvelncident(){

//Set the 'Incident state' and 'State' values to 'Resolved', and display mandatory fields
g_form.setValue('incident_state', 6), g_form.setValue('state', 6);
g_form.setValue('resolved_by', g_user userID);
gsftSubmit(null, g_form.getFormElement(), 'resolve_incident'); //MUST call the 'Action
name' set in this UI Action }
50

//Code that runs without 'onclick'


//Ensure call to server-side function with no browser errors
If (typeof window == 'undefined')
serverResolve();

function serverResolve(){
current.incident_state = IncidentState.RESOLVED;
current.state IncidentState. RESOLVED;
current.resolved_by = gs.getUserID();
current.update();
}
246 . What does "Global UI Action" refer to in ServiceNow?
In ServiceNow, a "Global Ul Action" refers to a specific type of Ul action that can be created
and applied globally (Table) across the platform. Ul actions in ServiceNow are custom scripts
or code snippets that can be executed from the user interface to perform specific tasks or
actions.
247 . How can I redirect an action to the current and previous document using UI Actions?

Current Record: action.setRedirectURL(destinationURL);


Previous Record: action.setReturnURL(destinationURL);

248 . How can I override UI Actions for an extended table?


You can override Ul actions for an extended table in the following ways:

1. Complete the following steps to override a Ul action on the Task table specifically for the
Incident table.

- Create a Ul action on the Incident table with the same Action name. If the Action name is
not defined, use the same Name. Enter a script that is specific to the Incident table.
- Complete the following steps to remove a Ul action on the Task table for the Incident table.
Navigate to the Ul action definition for the Task table

Add the condition current.getRecordClassName() !='incident'.


2. We can override the parent table Ul action on the child table via setting the "Override'
field
Scheduled Jobs
249. What is a scheduled job in ServiceNow and what is its purpose?
A scheduled job, also known as a scheduled task or a cron job in some systems, is a
computer program or script that is set to run automatically at specific intervals or predefined
times. Its purpose is to perform certain tasks or operations on a regular schedule without
requiring manual intervention.

The main purposes of scheduled jobs are:

• Share reports automatically


51

• Time-based operations
• Efficiency
• Convenience
• System Health and Monitoring
• Resource Optimization

250 . Can a schedule job invoke an inactive business rule?


Yes, a scheduled job can invoke an inactive business rule in certain scenarios. By default,
scheduled jobs are not affected by the active or inactive status of business rules.
251 . Can we trigger email notification via schedule job?

Yes, you can trigger email notifications via a scheduled job in ServiceNow. Scheduled jobs in
ServiceNow can be programmed to execute specific actions, including sending email
notifications, at defined intervals or on a predefined schedule. This capability allows you to
automate the process of sending important emails to users or groups without manual
intervention.
To trigger email notifications using a scheduled job, follow these general syntax:
gs.eventQueue('event_name', current, 'Param1', 'Param2')

252 What actions can you perform with a scheduled job?

With a scheduled job, you can perform various actions, including:


Data processing: Scheduled jobs can be used to process and manipulate data in the system
at specific intervals.
Automated notifications: You can configure scheduled jobs to send automated notifications,
reminders, or alerts to users or groups based on predefined criteria or events
Report generation: You can schedule jobs to generate and deliver reports automatically,
ensuring that critical information is regularly shared with stakeholders.
Workflow actions: Certain scheduled jobs can be set up to initiate specific workflow actions
or approvals automatically, streamlining business processes.
Rule-based operations: With scheduled jobs, you can implement rule-based operations,
executing scripts or business rules at predefined intervals.

Glide API's & Scripting Scenarios


253 . What is the Glide API in ServiceNow, and what is its purpose?

In ServiceNow, the Glide API (Application Programming Interface) is a collection of server-


side JavaScript classes and methods that allow developers to interact with the platform's
data and functionality. The Glide API serves as a powerful toolset for developers to perform
various operations programmatically within the ServiceNow instance.

254 .Can you provide examples of some server-side and client- side APIs in ServiceNow?
Types of Glide API's
Client Side Server Side
Glide Form Gilde Record
52

Glide User Glide System


Glide Ajax Glide Date
Glide Dialog Glide Date and
Window Time
Glide List Glide Aggregation
Glide Menu Glide Element

255 . What is GlideRecord in ServiceNow, and what is its purpose?


In ServiceNow, GlideRecord is a server-side JavaScript API used for database operations. Its
purpose is to allow developers to interact with records in ServiceNow tables, enabling them
to query, insert, update, and delete data programmatically.

 Most Common API


 Running from server side
 Used to generate SQL Queries
 Perform CRUD operations
256 . What is Glide Aggregate in ServiceNow?

In ServiceNow, Glide Aggregate is a server-side JavaScript API that provides a way to perform
aggregate functions on data retrieved from ServiceNow tables. It allows developers to
perform calculations, such as sum, average, minimum, maximum, and count, on groups of
records to obtain summary information.

257 . What is the difference between Glide Record and Glide Aggregation in ServiceNow?

Glide Record:
Purpose: GlideRecord is a server side JavaScript API used for database operations, allowing
developers to interact with records in ServiceNow tables.
Functionality: GlideRecord is primarily used for querying, inserting, updating, and deleting
records It is used to retrieve individual records or sets of records based on specific filter
conditions,

Glide Aggregate:
Purpose: GlideAggregate is also a server-side JavaScript API used for database operations,
but it is specifically designed for performing aggregate functions on data retrieved from
ServiceNow tables.
Functionality: GlideAggregate supports various aggregation functions, such as sum, average,
minimum, maximum, and count. It is used to perform calculations on groups of records to
obtain summary information. GlideAggregate allows for grouping records based on specific
field values,

258 . How can I get the count of active records from Incident Table?

To obtain the count of records from GlideRecord in ServiceNow, you can use the
getRowCount() method. Here's how you can do it in a server side script // Create a
var înc = new GlideRecord('incident');
inc.addActiveQuery();
53

inc.query();
gs.print(inc.getRowCount());

259. How can I obtain the count of records from the Incident table using Glide Aggregation
in ServiceNow?

To get the count of active incident records via Glide Aggregate in ServiceNow, you can follow
these steps in a server-side script
var ga = new GlideAggregate('incident');
ga.addQuery('active', true);
ga.addAggregate('COUNT');
ga.query();
var activelncidentCount = 0;
if (ga.next()) {
activeIncidentCount = ga.getAggregate('COUNT'); }
gs.info('Number of active incident records: ' + activelncidentCount);

260 . What is the best practice for obtaining the count of records from ServiceNow tables:
Glide Record or Glide Aggregation, and why?

If you need to retrieve a count of records based on specific conditions or filters, and you also
require access to individual records or their field values, then using GlideRecord is a suitable
approach.

While GlideAggregate is focused on counting records, it does not provide access to individual
record's field values like GlideRecord does.
Note: Glide Aggregation is best practice.

261 . What is the purpose of the setForceUpdate() method in GlideRecord, and what does
it do?
The setForceUpdate() method in GlideRecord is used to force an update on a record, even if
no changes have been made to its field values. By calling setForceUpdate(true) on a
GlideRecord object before updating and saving the record,

Purpose: The primary purpose of setForceUpdate() is to ensure that certain actions, such as
Business Rules or workflow activities, are executed when updating a record, even if no actual
changes to the record's field values have occurred

Here's an example of using setForceUpdate() in a server-side script:

var gr = new Glide Record('incident');


gr.get('number', 'INC00123');
gr.setForceUpdate(true);
gr.state = '2';
gr.update();
54

262 How can we update records without updating system fields like Updated, Created, etc.
for a particular update?

In ServiceNow, you can update records without modifying system fields using below script

var inc = new GlideRecord('incident');


inc.addQuery('category', 'software');
inc.query();
inc.category 'network'; inc.autoSysFields(false);
inc.updateMultiple();

263 . What is the importance of the setWorkflow() method in GlideRecord in ServiceNow?


where you don't need business rule or workflow actions to be executed during record
updates, using setWorkflow can help optimize performance by bypassing unnecessary
actions and reducing system overhead.

var gr = new GlideRecord('table_name');


gr.get('sys_id'); // Retrieve a specific record for update
gr.setValue('field_name', 'new_value');
gr.setWorkflow(false); // Set to 'true' to enable workflow and business rule
execution,'false' to disable them.
gr.update();

264 . Could you please tell me some GlideRecord methods in ServiceNow?


Here are some commonly used GlideRecord methods in ServiceNow:

addQuery query hasNext getRowCount addQuery


query getValue get
setValue insert update
deleteRecord hasNext getRowCount
orderBy addEncodedQuery addActiveQuery
choose Window initialize setLimit

265 . What is Glide Form, and what are some Glide Form methods in ServiceNow?

Glide Form is an object that represents a form displayed on the user interface. It provides
various methods to interact with and manipulate the form elements. Here are some
commonly used Glide Form methods:

1.setValue(fieldName, value): Sets the value of a field on the form.


2. getValue(fieldName): Retrieves the value of a field from the form.
3. getField(fieldName): Gets the GlideElement object representing a field on the form.
4. clearValue(fieldName): Clears the value of a field on the form.
5. addOption (fieldName, value, display): Adds an option to a choice field (select box or
radio button).
6. removeOption(fieldName, value): Removes an option from a choice field.
7. setMandatory (fieldName, is Mandatory): Sets a field as mandatory or non- mandatory.
55

8. setReadOnly(fieldName, isReadOnly): Sets a field as read-only or editable.


9. setDisabled(fieldName, is Disabled): Sets a field as disabled or enabled.
10.setDisplay(fieldName, display): Shows or hides a field on the form.
11.addDecoration(fieldName, type, label): Adds a decoration (e.g., icon, tooltip) to a field.
12.getControl (fieldName): Gets the DOM element of a field on the form.
13 isModified (fieldName): Checks if a field has been modified by the user
14. isMandatory (fieldName): Checks if a field is mandatory.
15. isNewRecord(): Checks if the form is displaying a new record.
16. clearMessages(): Clears all form notification messages.
17. showFieldMsg(fieldName, message, type): Displays a message under a specific field.

266 : What is the difference between setVisible and setDisplay in ServiceNow?


In summary, the key difference between setVisible and setDisplay is that setVisible only
visually hides or shows the field, while the field still occupies space in the form's layout. On
the other hand, setDisplay completely removes the field from the layout when hidden,
saving space and avoiding any impact on the form's appearance.
267 .How can I copy attachments from one record to another in ServiceNow?
GlideSysAttachment.copy('from table', current.sys_id, 'to table', dmnd.sys_id)

268.How can I display all active incidents opened by the same caller as a related list on
incident records in ServiceNow?

To show all active incidents opened by the same caller as a related list on incident records in
ServiceNow, you can achieve this through a related list script.

current.addQuery('caller_id', parent.caller_id);
current.addActiveQuery();
269 . Can we use Glide Record in the client-side scripts in ServiceNow?
Yes, you can use Glide Record in client-side scripts in ServiceNow. Glide Record is a powerful
API that allows you to interact with records in the ServiceNow database.

270 .In ServiceNow, how can I retrieve the 5 most recently created incident records from
the Incident table?

To obtain the 5 most recently created incident records from the Incident table in
ServiceNow, you can use the GlideRecord API with a query and ordering by the
'sys_created_on' field in descending order. Here's how you can do it through a server- side
script (such as a Script Include or Business Rule):

var incidentGR = new GlideRecord('incident');


incidentGR.orderByDesc('sys_created_on');
incidentGR.setLimit(5);
incidentGR.query();
while (incidentGR.next()) {
var number incidentGR.getValue('number');
var shortDescription = incidentGR.getValue('short_description');
gs.info('Incident Number: ' + number +', Short Description: ' + shortDescription);
56

271 . How can I close incident records that are related to a problem ticket in ServiceNow?

To close incident records that are related to a problem ticket in ServiceNow using
GlideRecord, you can follow these steps.

(function executeRule (current, previous) {


var problemTicket = current.problem_ticket;
if (problemTicket) {
var incidentGR = new GlideRecord('incident');
incidentGR.addQuery('problem_ticket', problemTicket);
incidentGR.query();
while (incidentGR.next())
incidentGR.incident_state = 7;
incidentGR.close_code = 'Closed/Resolved';
incidentGR.close_notes = 'Incident resolved along with the related problem
ticket.';
incidentGR.update();
}
}
})(current, previous)

272 . How can you ensure that the system creates 5 task tickets after incident tickets are
created in ServiceNow? How do you achieve this?

To ensure that the system creates 5 task tickets after incident tickets are created in
ServiceNow, you can use a Business Rule along with a server-side script to automatically
generate the task tickets. Here's how you can achieve this.
1. Create a Business Rule(After BR)

(function executeRule(current, previous) {


var taskGR = new GlideRecord('task');
for (var i = 1; i <= 5; i++) {
taskGR.initialize();
taskGR.short_description = 'Task' + i;
taskGR.incident = current.sys_id;
var taskSysID = taskGR.insert();
gs.info('Task' + i + ' created with sys_id: ' + taskSysID);
{
})(current, previous);

273 . When a request is closed, the system should automatically close all Requested Items
(RITMs) in the Service Catalog. How can this be achieved?
57

When a request is closed in ServiceNow, the system should automatically close all Requested
Items (RITMs) associated with that request in the Service Catalog. This can be achieved using
Business Rules or Workflow Automation.

Here's a general approach to accomplish this:

(function executeRule(current, previous) {


if (current.state == 3) {
var ritmGR = new GlideRecord('sc_req_item');
ritmGR.addQuery('request', current.sys_id); ritmGR.query();
while (ritmGR.next()) { ritmGR.state = 3;
ritmGR.update(); }
})(current, previous);

274 . Can you please provide a script to display the incident count for each state that has
been updated today?
Certainly! Here's a script using GlideAggregate to display the incident count for each state
that has been updated today:

function displayIncidentCountByStateUpdatedToday() { thaleam


var incidentGR = new GlideAggregate('incident');
incidentGR.addQuery('sys_updated_on', '>', gs.beginningOf Today());
incidentGR.groupBy('incident_state');
incidentGR.addAggregate('COUNT');
incidentGR.query();
gs.info('Incident Count by State Updated Today:');
while (incidentGR.next()) {
var state = incidentGR.getValue('incident_state');
var count = incidentGR.getAggregate('COUNT');
gs.info('State: ' + state + ', Count: ' + count);
}
} displayIncidentCountByStateUpdatedToday();

275 . How can you set the incident priority to "Critical 1" in the incident table when a "VIP
Customer" is selected in the caller field? How do you achieve this?

Here's how you can achieve this.

function onChange(control, oldValue, newValue, isLoading) {


if (isLoading || newValue === ") {
return;
}
var callerField = g_form.getReference('caller_id');
if (calleField.vip == 'true') {
g_form.setValue('impact', '1');
g_form.setValue('impact', '2');
g_form.showFieldMsg('caller_id', 'Caller is Vip!', 'info')
58

}else{
g_form.setValue('impact', '3');
g_form.setValue('impact', '3');
}}

276 . Write a script to print number of incidents categorized by Category and Sub-
Category?

Certainly! Here's a script using GlideAggregate to print the number of Incidents based on
their Category and Subcategory:

function printincidentCountByCategoryAndSubcategory() {
var incidentGR = new GlideAggregate('incident');
incidentGR.groupBy('category');
incidentGR.groupBy('subcategory');
incidentGR.addAggregate('COUNT');
incidentGR.query();
gs.info('Number of Incidents Category and Subcategory-wise:');
while (incidentGR.next()) {
var category incidentGR.getValue('category');
var subcategory = incidentGR.getValue('subcategory');
var count = incidentGR.getAggregate('COUNT');
gs.info('Category: ' + category +', Subcategory:' + subcategory +', Count: ' +
count);
}
} printIncidentCountByCategoryAndSubcategory();

277. What is a fix script, and could you provide one example?

A fix script, also known as a data fix script or correction script, is a type of script used in
ServiceNow to resolve specific issues, correct data inconsistencies, or make
necessary changes to the system. It is typically written to address problems or improve data
integrity within the platform.

(function fixMissingAssignmentGroup() {
100 var incidentGR = new GlideRecord('incident');
incidentGR.addQuery('assignment_group', 'ISEMPTY'); incidentGR.query();
while (incidentGR.next()) {
var category = incidentGR.category.getDisplayValue();
var assignmentGroup = getAssignmentGroupForCategory(category);
if (assignmentGroup) {
incidentGR.assignment_group = assignmentGroup;
incidentGR.update();
gs.info('Incident' + incidentGR.number + '- Assignment Group set to: ' + assignmentGroup);
} else {
gs.info('No assignment group found for Category: ' + category);
}
59

}
})();
function getAssignmentGroupForCategory(category) {
if (category === 'Hardware') {
return 'sys_id_of_hardware_support_group';
} else {
return null;
}

278 . How can you make the short description on an incident editable only for assignee
group members, while it remains non-editable for all other users? What are the different
ways to implement this scenario ?

To make the short description on an incident editable only for assignee group members
while remaining non-editable for all other users, you can implement this scenario using
ServiceNow's Access Control Rules (ACLs) or Client Scripts. Below are the different ways to
achieve this:
Method 1: Using Access Control Rules (ACLs)

1. Navigate to "Access Control Rules" in ServiceNow.


2. Click on "New" to create a new Access Control Rule.
3. Provide a name for the rule, e.g., "Edit Short Description for Assignee Group."
4. Set the "Applies to" field to "Incident" to target the incident records.
5. Write a condition for the rule to allow edit access only to members of the assignee group.
You can use current variable to access the incident record fields and the gs.getUser()
isMemberOf() method to check if the user is a member of the assignee group.
6. For the "Operation" field, choose "Write" to grant edit access.
7. Save the Access Control Rule.

Method 2: Using Client Scripts

1. Navigate to "Client Scripts" in ServiceNow.


2. Click on "New" to create a new Client Script.
3. Provide a name for the script, e.g., "Disable Short Description for Non-Assignee Group
Users."
4. Set the "Applies to" field to "Incident" to target the incident record form.
5. Set the "Type" field to "OnLoad" to trigger the script when the incident form loads.
6. In the script field, write a script to disable the short description field for non- assignee
group users. You can use g_user variable to access the current user's information and the
g_form.setReadOnly() method to make the field non-editable for specific users.
7. Save the Client Script.

Here's a sample code for Method 2:

function onLoad() {
var currentUser = g_user.getUserName();
var assigneeGroup = current.assignment_group.getDisplayValue();
60

// Replace 'Assignee Group Name' with the name of the assignee group
if (assigneeGroup !== 'Assignee Group Name') {
g_form.setReadOnly('short_description', true);
// Disable the short description field
}

279 . What is the difference between Fix Script and Background Script?

To ensure that the system creates 5 task tickets after incident tickets are created in
ServiceNow, you can use a Business Rule along with a server-side script to automatically
generate the task tickets. Here's how you can achieve this:

The difference between Fix Script and Background Script in Snow is as follows:
Fix Script:
Purpose: A Fix Script, also known as a data fix script or correction script, is used to resolve
specific issues, correct data inconsistencies, or make necessary changes to the system.

Background Script:
Purpose: A Background Script is a script that performs a specific task or operation in the
background without any user interaction.

280 . What is difference between initialise and newRecord method while inserting new
record?

The main difference between the initialize and newRecord methods while inserting a new
record in ServiceNow is how they handle the creation of the record:
initialize:
Initialize method is used to set default values for fields when creating a new record. It is
typically called before the record is inserted into the database
newRecord:
newRecord method is used to create a new, empty record for a specific table. It returns a
new Glide Record object that represents the new record.

281 . How can I create multiple records in incident table via GlideRecord?
To create multiple records via GlideRecord in ServiceNow, you can follow these steps:

var gr = new GlideRecord('incident');


var incidentData = [
{
short_description: 'First Incident',
description: 'This is the description of the first incident',
short_description: 'Second Incident',
description: 'This is the description of the second incident',
,
for (var i = 0; i < incidentData.length; i++) {
gr.initialize();
gr.setValue('short_description', incidentData[i].short_description);
61

gr.setValue('description', incidentData[i].description);
gr.insert();
}
gr.commit();

282 . What are some best practices for scripting in ServiceNow?

When scripting in ServiceNow, following best practices can help ensure efficient,
maintainable, and reliable code. Here are some key best practices for scripting in
ServiceNow:
1. Use Script Includes: Instead of writing all your script directly in Business Rules or Client
Scripts, encapsulate reusable code in Script Includes. Script Includes promote code reuse
and make it easier to maintain and update common functions.
2. Avoid Global Business Rules: Be cautious while using global Business Rules, as they can
impact various tables and lead to unexpected behavior. Prefer table- specific or more
targeted Business Rules.
3. Limit Use of Client Scripts: Client Scripts run on the client-side and can affect the user
experience. Use them judiciously, and consider alternative methods like UI Policies and
Client Scripts only when necessary.
4. Use GlideRecord Wisely: Be mindful of performance when using GlideRecord queries. Use
addQuery and addEncodedQuery to filter results efficiently. Also, limit the number of
records returned using set limit.
5. Avoid Direct Updates on Production: Direct updates to the database should be avoided in
production environments. Utilize APIs or business logic for making updates.
6. Proper Error Handling: Always include error handling in your scripts to catch and handle
exceptions gracefully. Use try-catch blocks to manage errors effectively.

Script Include and Glide Ajax


283 . What is a Script Include in ServiceNow?

A Script Include in ServiceNow is a server-side JavaScript object that encapsulates reusable


code and functions. It acts as a container for code that can be accessed and executed from
different parts of the platform, such as business rules, script actions, and workflows. Script
Includes promote code reuse, improve maintainability, and enhance performance by
encapsulating common logic.

284 . What are the types of Script Includes in ServiceNow?

In ServiceNow, there are two types of Script Includes

 On demand/classless Script Includes


• Extend an existing class Script Includes

285 . What are the benefits of script include in ServiceNow?


62

Script Includes in ServiceNow offer several benefits that contribute to the efficiency,
maintainability, and reusability of code within the platform. Some of the key benefits include

Code Reusability: Script Includes allow developers to encapsulate and organize reusable
blocks of code. This promotes a modular approach, making it easier to reuse the same logic
across multiple scripts, applications, and modules within the platform.
Centralized Logic: Script Includes provide a centralized location for storing server- side or
client-side logic
Performance Improvement: Since Script Includes are cached in memory, repeated access to
the same Script Include in different parts of the application doesn't result in redundant
database queries.

Version Control: ServiceNow provides version control for Script Includes, enabling
developers to manage changes to the script over time
Cross-application Communication: Script Includes can facilitate communication and data
sharing between different applications and modules within ServiceNow

286 . What are the best practices for using Script Includes in ServiceNow?

Using Script Includes in ServiceNow can greatly improve code organization, reusability, and
maintainability. To get the most out of Script Includes, consider the following best practices:

1. Modularization: Break down your code into logical modules based on functionality.
Create separate Script Includes for different modules to ensure code separation and
reusability.
2. Naming Conventions: Use descriptive and consistent names for Script Includes. This
makes it easier for developers to understand their purpose and promotes code consistency.
3. Avoid Global Variables: Minimize the use of global variables in Script Includes. Instead,
use function parameters to pass data and limit the scope of variables to the function.
4. Input Validation: Validate input parameters and data to ensure the code handles
unexpected values gracefully and prevents security vulnerabilities like SQL injection

287 . Could you please explain the syntax of an on-demand Script Include?

Sure, in ServiceNow, an on-demand Script Include is a way to include and use reusable
server-side JavaScript code only when needed, rather than including it automatically on
every page load. This can help improve performance and reduce unnecessary server-side
processing.

var emailValidation = Class.create();


emailValidation.prototype = {
initialize: function() { },
type: 'emailValidation' 1.);

288 . Is it possible to run a Script Include on the client-side?


63

No, Script Includes in ServiceNow are specifically designed to be executed on the server-side
and cannot be directly run on the client-side. Script Includes contain server-side JavaScript
code that interacts with the ServiceNow database and performs server-side operations.

To utilize the logic from a Script Include on the client-side, you can use GlideAjax, which
allows you to make server-side calls from the client-side scripts (such as Client Scripts or Ul
Actions) and retrieve the results

289 . What is the GlideAjax in ServiceNow?

GlideAjax in ServiceNow is a powerful client-side JavaScript API that allows you to make
asynchronous server-side calls from the client-side. It enables client scripts, Ul actions, and
other client-side components to communicate with server-side scripts and retrieve data or
perform server-side operations.
Using GlideAjax, you can pass data and parameters to server-side scripts, execute server-
side business logic, and receive responses back on the client-side

290 . What is the syntax for using GlideAjax in ServiceNow?

Certainly! The GlideAjax syntax in ServiceNow is as follows:


var ga = new GlideAjax("ScriptincludeName');
ga.addParam('sysparm_name', 'serverSideFunction'); /ion you want to call
ga.addParam('param_name', 'param_value');
ga.getXML(callbackFunction);
function callbackFunction(response) {
var answer = response.responseXML.documentElement.getAttribute('answer');
}

291 . Types of GlideAjax in ServiceNow?


There are two types of GlideAjax in ServiceNow.
Synchronous GlideAjax
Asynchronous GlideAjax

292. What is the difference between synchronous and asynchronous GlideAjax in


ServiceNow?

Synchronous GlideAjax:
Execution: Synchronous GlideAjax makes a server-side call from the client-side and waits for
the response before proceeding with the execution of client-side code.
Use Case: Synchronous GlideAjax is used when you need to ensure that the server- side
operation is completed and the result is available before continuing with the client-side
logic. It's suitable for situations where the subsequent client-side code depends on the data
retrieved from the server

Asynchronous GlideAjax:
64

Execution: Asynchronous GlideAjax also makes a server-side call from the client-side, but it
does not wait for the response. Instead, it continues executing the client-side code
immediately after the server-side call.
Use Case: Asynchronous GlideAjax is used when you want to initiate a server-side operation
but do not need to wait for the response before executing other client-side logic. It's suitable
for scenarios where the server-side operation is time-consuming. and you want to prevent
any interruption to the user experience.

293 .How many ways are there to obtain data from the server to the client in ServiceNow?

There are three main ways to obtain data from the server to the client in ServiceNow.

GlideAjax: GlideAjax is a client-side JavaScript API that allows you to make asynchronous
server-side calls from the client side. It enables you to pass data and parameters to server-
side scripts, execute server-side business logic, and retrieve responses back to the client-
side.
g_scratchpad: It is a JavaScript object that is available in Display Business Rules. It is used to
store and share temporary data between the client-side and server-side scripts.
getReference(): you can access the sys_id and display value of a reference field and perform
any necessary operations based on this information in your client-side scripts within
ServiceNow.

294 . Can we call a Script Include in a UI Action and Business Rule in ServiceNow?

Yes, in ServiceNow, you can call a Script Include from both a Ul Action and a Business Rule.

Calling Script Include in a UI Action: To call a Script Include from a UI Action, you typically
use GlideAjax to make a server-side call from the client-side. This allows you to access the
server-side logic encapsulated within the Script Include and retrieve data or perform server-
side operations. You can use a Ul Action with client-side scripts to initiate the GlideAjax call
and handle the response on the client-side.
Calling Script Include in a Business Rule: In a Business Rule, which runs on the server-side
vou can directly call a server-side function defined within a Script Includeusing GlideScript
methods like new global. ScriptincludeName().functionName(). This allows you to utilize the
functionality of the Script Include within the server-side logic of the Business Rule.

295. How can I call a Script Include in a UI Action? Could you please provide an example?

To call a Script Include from a UI Action in ServiceNow, you can use GlideAjax to make a
server-side call from the client-side.

function generateRandomNumber() {
var ga new GlideAjax('CustomUtils');
ga.addParam('sysparm_name', 'getRandomNumber');
ga.getXML(function(response) { var randomNumber = }); }

response.responseXML.documentElement.getAttribute('answer');
65

alert("Random Number: " + randomNumber);


generateRandomNumber();

296 . How can I call a Script Include in Business Rules? Could you please provide an
example?

Certainly! To call a Script Include in Business Rules in ServiceNow, you can use the GlideAjax
API to make a server-side call from the Business Rule. This allows you to access the server-
side function defined within the Script Include and perform server- side operations. Here's
an example of how to do this:
(function executeRule(current, previous /*null when async*/) {
var businessLogic new BusinessLogic(); // Replace 'BusinessLogic' with the actual name of
your Script Include businessLogic.updatePriority(current); ))(current, previous);

297 . How can I call one Script Include from another Script Include in ServiceNow?

To call one Script Include from another Script Include in ServiceNow, you can simply create
an instance of the first Script Include within the second one. This allows you to access the
server-side functions defined in the first Script Include and use them within the second
Script Include.

Here's an example of how to call one Script Include from another:

Assume you have two Script Includes:

Script Include 1: Utils1


var Utils1 Class.create();
Utils1.prototype = {
initialize: function() {},
sayHello: function() {
return "Hello from Script Include 1!"; },
type: 'Utils1' };

Script Include 2 Utils2

var Utils2 Class.create();


Utils2.prototype = {
initialize: function() {},
useUtils1 Function: function() {
var utils 1 Instance = new Utils1();
var message = utils1Instance.sayHello();
return "Using Utils1:" + message; }, type: 'Utils2' };

298 .Can I call a global Script Include from within a scoped application in Service Now?
66

No, you cannot call a global Script Include directly from within a scoped application in
ServiceNow. Scoped applications have their own isolated and restricted environment, and
they cannot access global resources directly.

If you need to use the functionality provided by a global Script Include within a scoped
application, you have a few options:

1. Copy the Code: If the code in the global Script include is not too complex, you can
manually copy the relevant parts of the code into the scoped application's Script Include.
This way, the scoped application will have its own version of the functionality.
2. Create a Local Script Include: In the scoped application, you can create a new Script
Include with similar functionality to the global Script Include. This local Script Include will be
specific to the scoped application and can be used to implement the required functionality.
3. Use GlideAjax: If the global Script Include provides server-side functionality, you can use
GlideAjax to make server-side calls from the scoped application to the global Script Include.
This allows you to access the functionality provided by the global Script Include indirectly.
By following these approaches, you can work within the constraints of the scoped
application and still achieve the desired functionality without directly calling global
resources from within the scope.

299 . What is the difference between the has and hasNext methods in ServiceNow's
GlideRecord?

The has and hasNext methods in ServiceNow's GlideRecord serve different purposes in
working with database queries.

has method:
• The has method is used to check if the GlideRecord query has resulted in any records.
• It returns a boolean value (true or false) indicating whether the query has produced any
records.
• This method is commonly used in conditions to determine if there are records that meet
the specified criteria before iterating through the result set.

var gr = new GlideRecord('incident');


gr.addQuery('priority', '1');
gr.query();
if (gr.has()) { // There are records with priority 1// Proceed with further operations } else
{ // No records with priority 1 found// Take appropriate action
}

hasNext method:

• The hasNext method is used to check if there are more records to iterate through in the
current GlideRecord result set.
• It returns a boolean value (true or false) indicating whether there are more records
available after the current record in the result set.
67

• This method is typically used in a loop to iterate through the result set one record at a
time.

var gr = new GlideRecord('incident');


gr.addQuery('active', 'true');
gr.query();
while (gr.next()) { if (gr.hasNext()) { } else { break; }}

300. What is a UI Script in ServiceNow and usage?

In ServiceNow, a UI Script is a type of client-side script written in JavaScript that allows you
to customize the behavior and appearance of the user interface. UI Scripts run on the client-
side, within the user's web browser, and are used to enhance the user experience in
ServiceNow.
Let's say you have a custom application in ServiceNow that manages employee onboarding.
You want to ensure that when a new user is added, their Employee ID is automatically
generated based on the pattern "EMP" followed by a unique number.
Here's how you can achieve this using a UI Script:

function onLoad() {
if (g_form.isNewRecord() && g_form.getValue('employee_id') === "") {
var uniqueNumber = generateUniqueNumber();
g_form.setValue('employee_id', 'EMP' + uniqueNumber);
}}
function generateUniqueNumber() {
return Math.floor(Math.random() * 1000);

301 . What is the best practice for obtaining data from the server to the client in
ServiceNow?

The best practice for obtaining data from the server to the client in ServiceNow is to use
GlideAjax. GlideAjax is a powerful and efficient API that allows you to make asynchronous
server-side calls from the client-side JavaScript code.
Here's why GlideAjax is considered the best practice:

Asynchronous Communication
Efficient Data Retrieval
Security Considerations
Scoped Applications
Error Handling

302 . How can you obtain the logged-in user's ID on the client- side in ServiceNow?

Here's an example of how to obtain the user ID on the client-side.

// Get the user ID of the currently logged-in user


var userld = g_user.getID();
68

// Display the user ID in the browser console


console.log("User ID: " + userld);

303 . How can you obtain the logged-in user's ID on the server- side in ServiceNow?

Here's an example of how to obtain the user ID on the server-side using


gs.getUserID().
// Get the user ID of the currently logged-in user
var userld = gs.getUserID();
// Display the user ID in the server logs
gs.info("User ID: " + userid);
304. Can you use GlideAjax in ServiceNow to automatically populate user details such as
department, first name, last name, company, title, and location based on the 'Requested
for' field?

Create a Script Include: Create a Script Include in ServiceNow that contains the server-side
script to fetch the user details.
Example Server-Side Script Include:
var ScriptIncludeName = Class.create();
ScriptincludeName prototype = {
initialize: function() {}.
getUserDetails: function() {
var userld = this.getParameter('sysparm_user_id');
var user = new GlideRecord('sys_user');
if (user.get(userld)) (
var userDetails = {
department: user getValue(department'),
first_name: user.getValue('first_name').
last_name: user.getValue("last_name'),
company: user.getValue('company'),
title: user.getValue('title'),
location: user.getValue('location')
return JSON.stringify(userDetails),
return null;
type: 'ScriptIncludeName
};
Write the Client-Side Script: In the client-side script, use GlideAjax to make an asynchronous
server-side call to a Script Include that retrieves the user details based on the "Requested for
user's ID.

Example Client-Side Script:


function autoPopulateUserDetails() {
var requestedFor = g_form.getValue('requested_for');
var ga = new GlideAjax('ScriptincludeName');
ga.addParam('sysparm_name', 'getUserDetails');
ga.addParam('sysparm_user_id', requestedFor).
ga.getXML(populateFormFields);
69

}
function populateForm Fields (response) {
var xmlDoc = response.responseXML;
var user = xmlDoc.documentElement.getAttribute('user');
if (user) {
g_form.setValue('department', user.getAttribute('department')),
g_form.setValue('first_name', user.getAttribute('first_name')) g_form.setValue('last_name',
user getAttribute('last_name')); g_form.setValue('company', user.getAttribute('company'));
g_form.setValue('title', user getAttribute('title')); g_form.setValue('location',
user.getAttribute('location')); }

305. What are some best practices for server-side scripting in ServiceNow?

Here are some best practices for server-side scripting in ServiceNow.

Use Script Includes: Encapsulate reusable server-side logic in Script Includes. This promotes
modularity.
Avoid Direct Queries: Refrain from using direct queries (e.g., new
GlideRecord('table_name')) whenever possible Instead, utilize ServiceNow APIs and built-in
functions for data interactions, such as GlideRecord queries and GlideAggregate for
aggregations.
Optimize Queries: Minimize the number of queries executed in a single script. Consider
retrieving all necessary data in a single query using joins or related lists, rather than
performing separate queries within loops.
Check Record Existence: Always verify if a record exists before accessing its fields or
performing any operations on it.
Efficient Loops: Avoid using nested loops as they can lead to performance issues.
Error Handling: Implement proper error handling in your scripts. Use try-catch blocks to
catch exceptions and handle errors gracefully.
Avoid Global Business Rules: Be cautious with the use of global business rules as they can
impact performance and affect the entire platform.
Avoid Heavy Computations: Refrain from executing heavy computations or long- running
scripts on synchronous events like "before" business rules, as they can cause delays in
processing other operations.
Limit gs.print) in Production:. While debuggmg,itis common to use gs.print () for output.
Use GlideRecord.setWorkflow(false): When updating records through server-side scripts
and you don't want to trigger business rules or workflows.

306 . What are GlideDate and GlideDateTime in ServiceNow?


GlideDate: GlideDate is a class that represents a date without a time component. It is used
for manipulating and working with date values in ServiceNow
var gd = new GlideDate();
gs.print(gd);

GlideDateTime: GlideDateTime is a class that represents both date and time values. It
includes date and time components,
var gdt = new GlideDateTime();
70

gs.print(gdt);

307 . Which method can you use to obtain the current system time and date?

To obtain the current system time and date in ServiceNow, you can use the new
GlideDateTime()
var currentDateTime = new GlideDateTime();
var formattedDateTime = currentDateTime.getDisplayValue();
gs.info("Current System Date and Time.+ formattedDateTime);

308 . What is Glide System, and what is its purpose in Service Now?

GlideSystem is a fundamental JavaScript class in ServiceNow, and it serves as a global object


providing access to various system-related functions and properties. It plays a crucial role in
facilitating server-side scripting and interactions with the ServiceNow platform.

1. Logging: It allows developers to log messages, errors, and debugging information using
methods like gs.info(), gs.error(), and gs.debug().
2. Date and Time Management: It provides functions for working with dates and times, such
as gs.daysAgo(), gs.hoursAgo(), and gs.minutesAgo()
3. User Information: It allows access to information about the currently logged-in user, such
as user ID, user roles, and user preferences.

309 . What Is Glide Sesssion in ServiceNow?

In ServiceNow, GlideSession is an important server-side JavaScript class that represents a


user session within the platform. It provides methods and properties that allow developers
to access and manage session-related information and activities.

1. Accessing User Information: Retrieve details about the currently logged-in user, such as
the user's ID, name, roles, email address, and other profile information.
2. Managing Authentication: Check the authentication status of the user session to
determine whether the user is logged in or not.
3. Session Management: Track session activities, set session variables, and manage session
timeouts and expiration.
4. User Preference Handling: Access and modify user-specific preferences and settings.
5. Language and Locale Settings: Obtain language and locale information for the user's
session to provide localized content.

310 . What is Glide Mutex in ServiceNow?

In ServiceNow, GlideMutex is a feature that provides a mechanism to control concurrent


access to a specific shared resource in a multi-threaded environment. one thread (or script)
can access the shared resource at a time, preventing potential conflicts and data
inconsistencies that may arise due to simultaneous access.
311 . What is Glide List, and what is its purpose in ServiceNow?
71

In ServiceNow, GlideList is a client-side JavaScript class that represents a list of related


records displayed on a form. Its purpose is to provide developers with the ability to interact
with and manipulate the list of related records associated with a particular form without the
need to reload the entire page.

312. What is the difference between "hasRole" and "has RoleExactly" in ServiceNow?

In ServiceNow, "hasRole" and "hasRoleExactly' are two different methods used to check a
user's role membership within the platform. The main difference between these methods
lies in how they handle roles inherited through role hierarchy.

var userHasRole = gs.hasRole('itil');


gs.info('User has ITIL role: ' + userHasRole);
var userHasExactRole = gs.has RoleExactly('itil');
gs.info('User has exact ITIL role: ' + userHasExactRole);

313. What is a Glide Dialog Window, and can you provide one example?

In ServiceNow, a Glide Dialog Window is a Ul component that allows developers to create


custom dialog boxes or pop-up windows for interacting with users. These dialog windows
are often used to gather input from users, display information, or provide simple forms for
data entry.

Glide Dialog Windows are created using JavaScript and can be opened from UI actions, client
scripts, business rules, or other client-side components in ServiceNow.

314 . What is a Glide Mutex in ServiceNow?

Glide Mutex in ServiceNow refers to a mechanism used for managing concurrency and
ensuring that critical sections of code are executed by only one thread or process at a time.
It helps prevent race conditions and data inconsistencies that can occur when multiple
threads attempt to access shared resources simultaneously. In essence, a Glide Mutex acts
as a lock that prevents multiple threads from executing certain code blocks concurrently.

315. What is GlideRecord Secure, and what is its importance?

In ServiceNow, "GlideRecord Secure refers to a data access control mechanism designed to


restrict access to sensitive records in the database. It is an important feature that helps
ensure data security and compliance with privacy regulations.

Data Security: GlideRecord Secure ensures that only users with appropriate
permissions can access specific records. This prevents unauthorized users from viewing or
manipulating sensitive data, such as personally identifiable information (PII) or confidential
business data.

316 . What is the difference between Glide Record and GlideRecord Secure in ServiceNow?
72

GlideRecord:

• GlideRecord is a JavaScript API in ServiceNow used for querying, updating, and


inserting records in a table.
• It provides direct access to database tables and allows developers to perform CRUD
(Create, Read, Update, Delete) operations on records.
• When using GlideRecord, it is the responsibility of the developer to implement data
access controls manually through script logic, such as checking user roles and
permissions before performing operations on records,

GlideRecord Secure:

• GlideRecord Secure is an extension of the GlideRecord API with built-in data access
control mechanisms.
• It provides the same functionality as GlideRecord but automatically enforces data

access controls based on user roles and permissions defined in ServiceNow's role-based
access control (RBAC) system
• GlideRecord Secure ensures that users can only interact with records they are
authorized to access, without requiring additional manual access control checks in
the script.

317. Do you have experience with HRSD?

I have a little bit of experience with HRSD, but I can manage the application

HRSD stands for Human Resources Service Delivery. It refers to the processes and activities
within an organization that are related to managing and providing various HR services to
employees and other stakeholders. HRSD encompasses a wide range of functions, including
but not limited to:

Employee onboarding and offboarding


Payroll management
Employee records management
Leave and absence management
Performance management
Training and development
HR policy implementation
Employee relations
Compliance and legal matters
Reporting and analytics

HRSD plays a crucial role in supporting the overall human resources function and ensuring
that employees' needs are met, contributing to a positive and productive work environment.

318. What Is the core table name for HRSD?


73

Each HR Center of Excellence is an extension of the HR Case [sn_hr_core_case] table and is


organized around a functional discipline, such as employee relations, lifecycle events,
payroll, talent management, workforce administration, total rewards, and HRIT operations

319 . What is the mid server, and what is it used for?


MID Servers help you to control and secure how ServiceNow communicates with your
organization’s systems, especially those behind a firewall. This supports four primary use
cases:
Integrations - Supporting LDAP, JDBC, REST, and SOAP based integrations to systems on your
intranet
Orchestration - Enabling orchestration with other systems via either workflow activities or
IntegrationHub spokes.
Discovery - Providing access to systems for traditional CI discovery and/or to support
discovery needed for service mapping
Attach Script File - MID Server Script Files can be used to communicate with targeted
devices (e.g., PowerShell, Javascript, .bat)
320 . What are the mid server credentials?

The "mid server credentials refer to the authentication information required to access and
authorize the mid server in an IT environment. These credentials typically consist of a
username and a corresponding password, but in some cases, they might also involve
additional security measures such as multi factor authentication (MFA) or API keys.

321. What is CMDB?

CMDB stands for Configuration Management Database. It is a fundamental component of IT


Service Management (ITSM) and IT Asset Management (ITAM) practices. A CMDB is a
centralized repository that stores detailed information about the configuration items (Cls)
within an organization's IT infrastructure.

Configuration items can include hardware assets (e.g., servers, computers, network
devices), software assets (e.g., applications, operating systems), and even documentation
and relationships between these items. The CMDB helps IT teams to keep track of the
various components in the IT environment, their attributes, and how they are
interconnected.

322 . What is a CMDB baseline?

A CMDB baseline is a specific snapshot or version of the Configuration Management


Database (CMDB) that captures a known and controlled state of an organization's IT
infrastructure at a particular point in time. It serves as a reference point against which future
changes and updates to the configuration items can be compared and tracked.

323. What is the base table in CMDB?

The base table in CMDB (Configuration Management Database) is the primary database
table that serves as the central repository for storing core information about the
74

configuration items (CIs) within an organization's IT infrastructure. This table holds detailed
records for each configuration item, including their attributes, relationships, and current
status. Thale name is [cmdb_ci]

324. What does "Discovery" mean in ServiceNow?

The term "Discovery" in the context of ServiceNow refers to a feature or process within the
ServiceNow platform. This feature is designed to automatically identify and map various
configuration items (Cls) and their relationships within an organization's IT infrastructure.
The primary goal of Discovery in ServiceNow is to create a comprehensive and accurate
representation of an organization's technology landscape.

In summary, Discovery in ServiceNow is a tool that automates the process of identifying,


categorizing, and mapping IT assets and their relationships, ultimately contributing to more
streamlined IT service management and operational processes.

325 . What are the different phases in the discovery process?

Discovery follows these phases:

Scanning: Discovery sends a probe called Shazzam to the network to see if commonly used
ports are open and if these ports can respond to queries.
Classification: If Discovery finds devices or computers, it sends additional probes to find the
type of device or the operating system on the device
Identification: Discovery tries to gather more information about the device and then tries to
determine if a Cl for the device exists in the CMDB
Exploration: The identifier launches additional probes configured in the classifier. These
probes are especially designed as exploration probes to gather additional information about
the device, like the applications running it, and additional attributes, such as memory.
network cards, and drivers.

ServiceNow Integration
326 . What does ServiceNow Integration refer to?

ServiceNow Integration refers to the process of connecting and exchanging data between
the ServiceNow platform and other external systems, applications, or platforms. It involves
establishing communication channels and data flow between ServiceNow and other
software solutions to facilitate seamless collaboration and automate various business
processes.

327 . What is inbound integration in ServiceNow? Can you explain one example of an
inbound integration that you have implemented?

In ServiceNow, inbound integration refers to the process of receiving data or events from
external systems into the ServiceNow platform. It allows ServiceNow to consume
75

information or trigger actions based on data received from external sources, enabling
seamless data exchange and process automation,

One example of an inbound integration that I can explain is the integration with an external
incident management system. Let's consider a scenario where an organization has a legacy
incident management system that is used by its IT team to track and manage incidents

328 . What is the difference between SOAP and REST?

REST (Representational State Transfer) and SOAP (Simple Object Access Protocol) are two
different web service communication protocols used for transmitting data over the internet.
Here are the main differences between SOAP and REST:

REST: REST is an architectural style that uses standard HTTP methods (GET, POST, PUT,
DELETE) to interact with resources (data entities) identified by URLs. It does not define a
strict message format and can use different data formats like JSON or XML
REST: REST does not enforce a specific message format. It allows multiple representations,
such as JSON, XML, HTML, and plain text, based on the client's and server's preferences.
REST: REST is a more flexible and lightweight approach without any strict standards. It can
use existing HTTP standards for security (HTTPS) and other functionalities.
REST: REST is simpler to implement and use, making it popular for web and mobile
applications. It is commonly used in modern web APIs due to its simplicity and ease of
integration.

SOAP: SOAP is a protocol that defines a set of rules for structuring messages and how they
should be sent over the network. It uses XML as its message format and typically relies on
HTTP, SMTP, or TCP for message transport
SOAP: SOAP messages are typically XML-based and have a defined structure, including
headers and body. Each operation has its own XML, request and response format.
SOAP: SOAP has a strict set of standards and specifications, including WS-Security for
security and WS-Atomic Transaction for transaction management
SOAP: SOAP can be more complex and requires additional libraries and tools for
implementation. It is commonly used in enterprise-level applications that require strict
security and transactional capabilities.
329 . What is ServiceNow Rest API explorer?

ServiceNow REST API Explorer is a built-in tool within the ServiceNow platform that allows
users to interactively explore and test the available REST APIs. It provides a user-friendly web
interface that simplifies the process of discovering, understanding, and testing RESTful web
services offered by ServiceNow.

1. API Endpoint Discovery


2. API Request Structure
3. Authentication Support
4. Request Testing
5. Response Visualization
6. Error Handling
76

330 . What are the types of HTTP methods?

1. GET: The GET method is used to retrieve data from the server. It requests the specified
resource's representation and does not cause any changes on the server.
2. POST: The POST method is used to submit data to the server to create or update a
resource. It is non-idempotent, meaning sending the same POST request multiple times can
create multiple resources or different outcomes.
3. PUT: The PUT method is used to update or replace an existing resource on the server. It is
idempotent, meaning sending the same PUT request multiple times will have the same
effect as sending it once
4. DELETE: The DELETE method is used to delete a specified resource on the server. It is also
idempotent, meaning sending the same DELETE request multiple times will have the same
effect as sending it once.
5. PATCH: The PATCH method is used to partially update a resource on the server. It is used
when you want to apply a partial set of changes to an existing resource
without replacing the entire resource

331 .What is the difference between the GET and PUT methods in ServiceNow?

In ServiceNow, the main difference between the PUT and PATCH methods lies in their
purposes and the way they handle updates to resources.

PUT Method:
The PUT method is used to update or replace an entire resource on the server with the new
data provided in the request.

PATCH Method:
The PATCH method is used to make partial updates to a resource on the server, modifying
only the specified fields or attributes with the new data provided in the request.

332. What is scripted rest API?

A Scripted REST API in ServiceNow is a custom API that allows developers to define and
expose their own RESTful web services within the ServiceNow platform. It enables
developers to create endpoints that can be accessed via standard HTTP methods (GET, POST,
PUT, DELETE) to interact with data and perform operations in ServiceNow
333 . What are the types of APIs in ServiceNow?

Table API: Allows CRUD (Create, Read, Update, Delete) operations on ServiceNow tables,
enabling interaction with records in the database.
Attachment API: Facilitates attachment management, allowing users to upload, retrieve, and
delete attachments associated with records.
Glide System API: Provides access to system-level information and functions, such as
creating records, querying system properties, and interacting with workflows.
77

Reporting API: the Reporting API is a specialized set of endpoints that allows users to
execute and retrieve data from various types of reports defined within the ServiceNow
platform.

334 . What are inbound actions in ServiceNow?

In ServiceNow, "Inbound Actions" refer to a feature that allows you to receive and process
incoming data or requests from external sources. These external sources can be third-party
systems, applications, or any other external entities that need to interact with your
ServiceNow instance.
335 . Could you explain what an inbound email action is in ServiceNow?

Sure! An "Inbound Email Action" in ServiceNow allows you to automate the processing of
incoming emails by defining rules and scripts that perform specific actions based on the
content of the received emails Here's an example with a script to illustrate how it works:

Let's say you want to automatically create an Incident in ServiceNow whenever a user

sends an email to your designated support email address.

Email Reception: ServiceNow's email server receives an email sent to your support email
address.
336 . What are the types of inbound email actions in ServiceNow?

In ServiceNow, the Inbound Email Actions can be classified into three types based on how
they handle incoming emails:

New: The "New" type of Inbound Email Action is used to create new records in ServiceNow
when an email is received.
Forward: The "Forward" type of Inbound Email Action is used to forward incoming emails to
specific recipients or distribution lists. This action does not create or update records in
ServiceNow directly.
Reply: The "Reply" type of Inbound Email Action is used to update existing records in
ServiceNow based on information provided in incoming emails.

337 . What is an Outbound Emall Action in ServiceNow?

In ServiceNow, an "Outbound Email Action" is a feature that allows the platform to send
automated emails to external recipients based on specific events or conditions. This
functionality enables users to configure rules and scripts that trigger the sending of
outbound emails, providing a powerful way to communicate with users, customers, or other
stakeholders outside of the ServiceNow instance

338. Could you provide an example of an inbound email action in ServiceNow?

Let's consider an example of an Inbound Email Action in ServiceNow for automatically


creating incidents when users send emails to a designated support email address
78

Example: Setting up an Inbound Email Action to Create Incidents

var subject = email.subject;


var body email.body_text;
var incident = new GlideRecord('incident');
incident.initialize();
incident.short_description = subject;
incident.description = body;
incident.caller_id = gs.getUserID();
incident.category = 'Email Support';
incident.priority = 3;
incident.contact_type = 'email'
var incidentID = incident.insert();
var acknowledgement = "Thank you for your email. We have created Incident ID: " +
incidentID;
email reply("Re:" email.subject, acknowledgement);

339. How can I forward emails using an inbound emall action In ServiceNow?

To forward emails using an inbound email action in ServiceNow, you can utilize the forward()
method available in the GlideEmailInbound object. This method allows you to specify the
recipient's email address and forward the entire content of the received email, including its
subject, body, attachments, and other relevant details.

Example Script for Inbound Email Action to Forward Emails (JavaScript).

function onEmailReceived() {
// Specify the email address to which the incoming email will be forwarded var
forwardingEmail = 'forwarding@example.com';
// Forward the incoming email to the specified recipient email.forward(forwardingEmail);}

340 . How can I use an inbound email action in ServiceNow to reply to emails?

To use an inbound email action in ServiceNow to reply to emails, you can utilize the reply()
method available in the GlideEmailInbound object. This method allows you to reply to the
sender of the received email by composing and sending an email response.

Example Script for Inbound Email Action to Reply to Emails (JavaScript)

function onEmail Received(){


var senderEmail email.origemail.getFrom();
var replySubject = "Re: " + email.subject;
var replyBody = "Thank you for your email. We have received your message and will
respond shortly";
email.reply(senderEmail, replySubject, replyBody); }
79

General Questions
341 . What is a report, and what are the types of reports available in ServiceNow?

A report in ServiceNow is a data visualization tool that allows users to present and analyze
information from various tables in the system. Reports help in summarizing and displaying
data in a structured and easily understandable format, making it simpler to gain insights and
make informed decisions.

ServiceNow provides several types of reports that cater to different data presentation needs.

Here are the common types of reports available in ServiceNow:

• List Reports • Pie Charts • Bar Charts ,Line Charts, Donut Charts, Gauge Charts, Pivot
Tables, Heat Maps

342 . What is a dashboard, and what is its usage in ServiceNow?

In the context of ServiceNow, a dashboard is a visual representation of important data and


key performance indicators (KPIs) that provide users with a real-time overview of the state
of their processes, operations, and services within the platform.
Dashboards in ServiceNow are customizable and configurable, allowing users to display
relevant information in a format that suits their needs.

Usage of Dashboards in ServiceNow

• Data Visualization • Real-time Monitoring • Performance Measurement


• Process Insights • Customization • User Engagement
• Executive Reporting • Data Driven Decision Making

343 . What is a Ul Macro in ServiceNow?

In ServiceNow, "Ul Macros" (User Interface Macros) are reusable components that allow
users to create custom user interface elements or widgets that can be embedded within
forms, lists, or other ServiceNow pages. UI Macros are written in Jelly scripting language and
HTML and provide a way to add dynamic content and functionality to the ServiceNow user
interface.

344 . Can you provide information about Angular or share your knowledge on Angular?

I have just an idea about angular but dont have hands on experience in angular. Angular is a
popular open-source web application framework developed by Google. It is written in
TypeScript, which is a superset of JavaScript, and is designed to build dynamic, single-page
applications (SPAs) and complex web applications. Angular provides a structured approach
to building web apps by using declarative templates, dependency injection, and various tools
and libraries
80

345. Have you had any experience with a service portal?

No, I don't have hands-on experience, but I can manage a service portal.

346 . What is Service portal?

In the context of IT and technology, a service portal is a web-based platform or application


that provides a centralized and user-friendly interface for accessing various services and
information. It serves as a self-service hub where users can interact with and request
support, access resources, and perform tasks related to specific services. Service portals are
commonly used in IT service management (ITSM) to streamline and enhance the user
experience

347 . What is a widget in the Service Portal?

A widget in the Service Portal refers to a modular component that displays specific
information or functionality on a web page. Widgets are designed to enhance user
experience by presenting data, interactions, or services in a visually organized manner. They
can vary in complexity, from simple elements like text and images to more intricate
components like forms, charts, and interactive elements.

348 . Could you please provide some widget names in ServiceNow?

Here are some widget names commonly used in ServiceNow:

1. Incident List 2. Knowledge Base Search 3. Service Catalog Categories


4. Announcements 5. Recent Requests 6.FAQs 7. My Profile 8. Interactive Banner
9. Feedback Form 10. Weather Widget 11 Calendar Events 12. Service Status
13. Quick Links 14. News Feed 15. Service Outages 16. Survey Widget

349. Do you have any experience with Jelly Script?

I don't have any experience with gelly script-

Jelly Script is a scripting language used in older versions of ServiceNow to customize and
configure various aspects of the platform. It allowed developers to create dynamic content,
forms, and user interfaces

HR and Manager
350 . Could you please introduce yourself?

Good [morning/afternoon], [Interviewer's Name]. Thank you for giving me the opportunity
to introduce myself. My name is [Your Name], and I am thrilled to be here today to discuss
my experience in ServiceNow.
81

With [number of years) years of experience in the IT industry, I have had the privilege of
working extensively with ServiceNow, both as a Adminstrator and Developer. My passion for
ServiceNow stems from its ability to transform how businesses manage their services and
workflows, ultimately improving efficiency and customer satisfaction.

Throughout my career, I have been involved in various ServiceNow implementation projects,


leading cross-functional teams, and collaborating with stakeholders to deliver successful
outcomes. My expertise lies in (mention your key areas of expertise, such as ITSM, CSM,
HRSD, etc.), and I am committed to staying updated with the latest ServiceNow features and
best practices

I have good experience with all these ServiceNow components, such as, UI Policy, Data
Policy, Client Scripts, Business Rules, UI Actions, Script Includes, Reports and Dash Boards,
Inbound Email Actions, Scheduled Jobs, UI Scripts, SLA's, ACL's, Related Lists, UI macros and
etc....

I have great experience into Incident, Problem, Change, Service Catalog. Knowledge
Management life cycle and state model

I have a track record of driving process improvements, automating workflows, and


optimizing ServiceNow configurations to align with the unique needs of
differentorganizations. I strongly believe that effective ServiceNow implementation is not
just about technology, but also about understanding the business requirements and
delivering solutions that add tangible value.

In addition to my technical skills, I am a proactive communicator and team player, capable of


building strong relationships with colleagues and clients. I enjoy collaborating in dynamic
environments and thrive in challenging projects that push me to grow both professionally
and personally.

I am excited to discuss how my experience aligns with the vision and goals of [Company
Name), and I am eager to explore how I can contribute to the continued success of the
ServiceNow practice here I appreciate this opportunity and am looking forward to our
conversation. Thank you.

Remember to personalize the introduction with your own experiences and achievements to
make it truly reflect your background and enthusiasm for the position.

354 . Could you tell me about one difficulty you have faced in your current project? How
did you solve it?

"One of the most challenging situations I faced in my current project was handling a major
software integration with a tight deadline. The integration required coordination between
multiple teams, each responsible for different aspects of the project. We encountered
unforeseen technical issues during the process, which added complexity to the project and
threatened to delay the implementation.
82

To overcome this challenge, I took a proactive approach and initiated daily meetings with all
teams involved to address roadblocks and ensure effective communication. I collaborated
closely with the technical experts to troubleshoot and resolve the issues promptly
Additionally, I reevaluated the project timeline and resource allocation to accommodate the
unexpected hurdles

355 . How do you gather requirements in your project?


"In my projects, I follow a structured approach to gather requirements effectively. Initially, I
engage in thorough discussions with key stakeholders, such as clients, users, and subject
matter experts, to understand their needs and expectations. I actively listen and ask probing
questions to gain a deep understanding of the project's goals and objectives.

After collecting the initial requirements, I create detailed documentation that outlines the
gathered information, ensuring clarity and accuracy. I collaborate closely with the
stakeholders throughout this process to validate the requirements and address any potential
gaps or changes.

Once the requirements are solidified, I engage in regular communication and updates with
the stakeholders to keep them informed about the project's progress and toensure that their
needs are continually met. Flexibility is essential during this process, as requirements may
evolve over time. Therefore, I remain open to feedback and adapt my approach accordingly
to ensure successful project delivery.

356 . What are your goals for the next 3 years?

Over the next three years, my primary goal is to advance my career and take on more
significant responsibilities within my field. I aim to become a subject matter expert in [your
field/industry), further honing my skills and expertise to make a meaningful impact.

In addition to professional growth, I am committed to enhancing my leadership abilities. I


aspire to lead and mentor a team, fostering a collaborative and productive work
environment Through effective communication and guidance, I aim to empower my team
members to reach their full potential.

357 . Do you have experience with other modules other than ITSM?

Yes, I do have experience with modules other than ITSM. Throughout my career, I have had
the opportunity to work with various modules within the ServiceNow platform. Some of the
additional modules I have experience with include:

• Human Resources Service Delivery (HRSD)


• Asset Management
• Customer Service Management (CSM)
358 . What are your strengths and weaknesses?

Strengths:
83

• One of my key strengths is my ability to adapt quickly to changing situations.


• I thrive in dynamic environments and enjoy taking on new challenges.
• Is adaptability has allowed me to excel in various roles and industries, enabling
me to learn and grow continuously.
• Another strength of mine is my strong analytical and problem-solving skills
I enjoy breaking down complex issues into manageable components and finding effective
solutions

Weaknesses:
• While I recognize the importance of time management
• Sometimes find it challenging to balance competing priorities effectively.
• I am continually working on improving my organizational skills to ensure that I stay
focused and deliver tasks in a timely manner.

363 . Have you done any certifications in ServiceNow?

Yes, I have completed several certifications in ServiceNow. As a dedicated professional, I


recognize the importance of staying updated with the platform's latest features and best
practices. (I have completed only one certificate)

ServiceNow Certified System Administrator (CSA): This certification covers the fundamental
concepts of ServiceNow, including user interfaces, configurations, and core application
functionalities.

365 . Have you gained any experience in ITBM?


Yes, I gained little bit experience in ITBM,

IT Business Management (ITBM) in ServiceNow refers to a suite of applications and tools


that are designed to help organizations manage their IT initiatives, projects, resources, and
finances more effectively. It encompasses various processes related to planning, executing,
and optimizing IT services and projects in alignment with the organization's business goals.

ServiceNow's ITBM suite typically includes the following key components:

Project Portfolio Management (PPM)


Agile Development
Application Portfolio Management (APM)
Financial Management
Resource Management
Demand Management
Time Tracking and Reporting

366 . What is cloning in ServiceNow? Can you provide an example?

In ServiceNow, cloning refers to the process of duplicating an existing record or configuration


item to create an identical or similar one. This feature is especially useful when you need to
84

create multiple records with similar data or configurations, saving time and effort in manual
data entry.

One example of cloning in ServiceNow is with Incident records. Let's say you have a complex
incident with numerous details such as affected users, assignment groups, and specific
troubleshooting notes. Later, you receive a similar incident that requires the same actions
and resolutions. Instead of creating a new incident from scratch and re-entering all the
information, you can clone the original incident

367 . Have you been involved in an instance upgrade in ServiceNow?

Yes, I have been involved in an instance upgrade in ServiceNow. During the upgrade process,
I played an active role in coordinating with the ServiceNow upgrade team, conducting
thorough testing, and ensuring a smooth transition to the new version.

As part of the upgrade project, I collaborated with various stakeholders to assess the impact
of the new version on our existing configurations, customizations, and integrations. We
identified potential areas that required adjustments or enhancements to align with the
upgraded instance.

Overall my experience in an instance upgrade allowed me to gain a deeper understanding of


the ServiceNow platform and its version specific improvements. It also reinforced the
significance of thorough planning, testing, and communication to achieve a successful and
efficient upgrade process.
368 . My ServiceNow instance is very slow. How can you fix the issue?

If your ServiceNow instance is experiencing slowness, there could be several reasons for the
issue. Here are some steps to help diagnose and potentially fix the problem:

Check System Performance: Start by monitoring the performance of your ServiceNow


instance. Use built-in monitoring tools or performance analytics to identify any bottlenecks
or areas of concern
Review System Logs: Analyze the system logs for any error messages or warnings that might
indicate the root cause of the slowness.
Review Scheduled Jobs: Check and manage scheduled jobs to avoid overlapping or
conflicting tasks that might cause performance issues.
Review Customizations: Examine any customizations, plugins, or scripts you have
implemented. Poorly optimizedcustomizations can impact performance. Consider reviewing
and optimizing these elements.
Cache Management: Check your caching configurations. Proper caching can significantly
improve performance by reducing the need to retrieve data repeatedly.
Database Tuning: Optimize the database configuration and indexing to improve query
performance.
Contact ServiceNow Support: If you cannot identify the cause of the slowness or if the issue
persists, consider reaching out to ServiceNow support for assistance.
Network Latency: Evaluate network latency between users and the ServiceNow server. A
slow network connection can affect system responsiveness.
85

369 . Do you have any experience in App Engine Studio?

While I haven't directly used App Engine Studio in ServiceNow in a professional capacity, I'm
highly skilled in ServiceNow and have a strong background in application development and
deployment. I'm confident in my ability to quickly learn and adapt to new tools and
technologies. Given my proficiency in ServiceNow's ecosystem, I am eager to leverage my
existing knowledge to excel in utilizing App Engine Studio effectively for developing and
optimizing applications.
370 . What is the biggest challenge you have faced in the current project?

In the current project, the biggest challenge I have faced is managing the tight deadline. The
project requires a lot of tasks to be completed within a limited timeframe, and ensuring
everything is done efficiently and on time has been quite demanding. To address this
challenge, we have implemented better project planning, streamlined communication
among team members, and prioritized tasks to meet the project's deadlines successfully.
371. HTTP methods what is PATCH and PUT?
PUT is a method of modifying a resource where the client sends data that updates the entire
resource .
PATCH is a method of modifying resources where the client sends partial data that is to be
updated without modifying the entire data.
372. Database view in servicenow.
A database view defines table joins for reporting purposes.
For example, a database view can join the Incident table to the Metric Definition and Metric
Instance tables. This view can be used to report on incident metrics and may include fields
from any of these three tables.

373. None & star acl in servicenow?


Table.none is a row level ACL which allows you to access records.
- Table.* is a field level ACL which gives Access to all fields on the table.
374. If there is 4 write acl 3 acl is not access but one acl is access then what will happen?
If the first three ACLs do not grant access (i.e., they evaluate to false), and the fourth ACL
grants access (i.e., it evaluates to true), then access will be allowed according to the fourth
ACL.

If any of the ACLs grants access before reaching the fourth ACL (e.g., if the second or third
ACL grants access), then the evaluation process stops, and access is granted based on that
ACL. The remaining ACLs are not evaluated.
If none of the ACLs grant access (i.e., they all evaluate to false), then access will be denied.

375. How To Stop form Submission or Restrict on Client side ?


Return False
376. How To Stop form Submission or Restrict on Server side ?
current.setAbourtAction(true) or setAbourtAction(true)
377. How To Restricts system Fields not update?
AutoSysFields(false)
378. How To Stop Business Rules In Form ?
setWorkFlow(false)
379. User Practice Purpose Background Script Is Best Yes Or No ?
86

No
380. how to move reports one instance to another instance ?
Update sets
381. UI Policy or client script Which One execute Frist ?
Client Script is Frist execute But Final out put is UI Policy
382. What Is Retroactive start In SLA ?
If Retroactive start Enable the checkbox , Calculate the Incident Created Time
383. What is The use of Reverse if false Checkbox in UI Policy ?
Enable the checkbox
384. the UI Policy will be reversed if the condition of the UI Policy is not
met.
(if condition meet UI policy was run , if condition not meet UI policy was
not Run )
385. What is The use Of Dictionary Override ?
allows you to modify the properties of a field in a child table without altering the
original definition of the field in the parent table
386. Print Current Logged in user Attachment incident Records ?

var gr = new GlideRecord('incident');


gr.addJoinQuery('sys_attachment','sys_id','table_sys_id');
gr.query();
while(gr.next()){
gs.print('Current Logged In user Attachment Incident
Records:'+gr.number);
}

389. Print Email Empty User List ?

var gr = new GlideRecord('sys_user');


gr.addNullQuery('email');
gr.query();
while(gr.next()){
gs.print(gr.name);
}

390. Print Group Members name and email ?

var groupName = 'CAB Approval';


var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('group.name', 'CAB Approval');
gr.query();
while (gr.next()) {
var user = gr.user.getRefRecord();
gs.print(user.email + '\t' + user.name);
}

391. How many ways Incident record can be created/inserted in


ServiceNow ?

Multiple ways we can create Incident record.

1) Manual 2) Record Producers 3) Employee Self Service 4) Inbound email


actions
5) Importing an XML/Excel etc and transforming the data 6) Server Side
Scripts( BR,WF,FIX SCRIPTS, background scripts etc) 7) Using Rest or Soap 8)
Custom widgets 9) Jelly Script
87

10) Flow designers 11) Advance work Assignment (using some custom stuff)
12) Now Assist 13) Virtual Agent 14)Scheduled Jobs

392. What is client script Purpose Of Client Script Types Of Client scripts in
ServiceNow?

Client scripts in ServiceNow are JavaScript code that runs on the client side (i.e., in
the user’s web browser) when certain events occur on a form or list. They are used
to manage and manipulate form fields, validate data, and provide a more dynamic
user experience.

Purpose of Client Scripts


Client scripts are primarily used to:
Control form behaviour : Show, hide, make fields read-only, or mandatory based
on specific conditions.
Validate data : Ensure that the data entered by users meets certain criteria before
submission.
Set field values : Automatically populate fields based on other field values or user
roles.
Provide user feedback : Display messages or alerts based on user actions.

Types of Client Scripts:


There are four main types of client scripts in ServiceNow:
onLoad :
Runs when a form is first loaded. Typically used to manipulate the form or set default
values.
onChange :
Runs when a particular field value changes. Useful for dynamically updating other
fields based on user input.
onSubmit :
Runs when a form is submitted. Often used to validate form data and prevent
submission if certain conditions are not met.
onCellEdit :
Runs when a cell value is edited in a list. Used to validate or manipulate data directly
in list views.

393. What is the use of Global Check Box in client script ?

The Global checkbox in a ServiceNow client script determines whether the script
should run on all views of a table or just a specific view.
Checked (Global) :
When the Global checkbox is checked, the client script will execute for all views of
the specified table. This is the default setting and ensures that the script applies
universally across different views.
Unchecked :
If you uncheck the Global checkbox, a new field called View becomes visible. You can
specify a particular view in this field, meaning the client script will only run when
that specific view is loaded

394. Write A Array 1 to 100 in Background Script ?


var array = [];
for(var i =1; i<=100;i++){
array.push(i);
}
gs.info(array);
88

395. Tables and internal names and short cuts

Incident list -------------- incident.LIST (opened to new tab)

Problem list ---------------- problem.LIST

New Incident --------------- incident.FORM or incident.do

New Problem -------------- problem.FORM

Incident Task ----------- incident_task

Change Request ------------ change_req

User List -------------------- sys_user.LIST

Group --------------- sys_user_group.LIST

Tables ----------------- sys_db_obeject, sys_dictionary, sys_documentation

Version ---------------- stats.do (current version Xnadu)

Incident form priority list -------------- dl_u_priority.LIST

Problem form priority list ----------- dl_problem_priority.LIST

Matchar Table ---------- dl_matcher

Date and time and logo changes ----------- basic configuration ui16 or UI 16

Location --------- cmn_location

Country --------------- core_country

Department ---------- cmn_department

Company ----------- core_company

Business Rules ----------sys_script

Client Script -------- sys_script_client

Configuration Item -------- cmdb_ci

User -------------- sys_user

group ------------- sys_user_group

UI policy ----------- sys_ui_policy

Request ------------- sc_request

catalog --------- sc_catalog

catalog item ----------- sc_cat_item


89

SLA------------------ contract_sla

SLA Task -------------- task_sla

Group member --------- sys_user_grmember

Roles ----------- sys_user_has_role


Attachment ------------ sys_attachments

HRSD COE
Human Resource Service Delivery (Centre of Excellence)

Human Resource Scoped App (Main Table) ------------ sn_hr_core_case

HR Employee Relations ----------- sn_hr_er_case

HR Employee Life Cycle Events ---------- sn_core_le_case

HR Employee Payroll ------------ sn_hr_core_case_payroll

HR Talent Management ------------ sn_hr_core_case_talent_management

HR Total Rewards Points ------------ sn_hr_core_case_total_rewards

HR IT Operations ----------- sn_hr_core_case_operations

HR Workforce Administration --------- sn_hr_cor_case_workforce_admin

396. A custom Table how many fields automatically Created ?

Answer : 6 Fields
When you create a new table in ServiceNow, several fields are automatically
generated.

Sys ID : (sys_id) (32 Digits Unique id )-A unique identifier for each record.
Created : (sys_created_on )-The date and time the record was created.
Created by : (sys_created_by )-The user who created the record.
Updated : (sys_updated_on)-The date and time the record was last updated.
Updated by : (sys_updated_by)-The user who last updated the record.
Updates: (sys_mod_count)-Number Of Updates For This Record Since Record
Creation
These fields are essential for tracking and managing records within the system

Note: Custom Fields and Custom Tables Indicates (u_)


Example: Passport Booing Application add One Field, Field Name Gender
(u_gender) ,Table name Passport Booking(u_passport_booking)

397. Print Active User Emails in Single Line ?

var gr = new GlideRecord('sys_user');


gr.addActiveQuery();
gr.query();
var emailList =[];
while(gr.next()){
emailList.push(gr.email.toString(''));
90

}
gs.print(emailList.join(','));

398. What is Ui policy What is Data policy in ServiceNow? Or


Difference Between Ui Policy and Data Policy ?

Ui Policy :
UI Policy Runs on Client Side, UI Policy in ServiceNow is a rule that dynamically
changes the behaviour of fields on a form based on specified conditions.
UI Policy can make fields mandatory, read-only, or hidden based on certain
conditions

UI Policy Use to Related List Hide

Making Fields Mandatory :


Ensure that certain fields must be filled out before a form can be submitted.
Hiding Fields :
Hide fields that are not relevant based on other field values.
Setting Fields to Read-Only :
Prevent users from modifying certain fields under specific condition

Data Policy :

Data Policy Runs Server Side, A Data Policy in ServiceNow is designed to enforce
data consistency and integrity across the platform.

Data Policies ensure that data entered into the system meets specific criteria, such
as making fields mandatory or read-only

Data Policies apply to all data entry points, including import sets, web services, and
mobile UI.

Mandatory and Read-Only Fields :


Data Policies can make fields mandatory or read-only to ensure that critical
information is captured and protected,

No Field Hide Option in Data Policy (Hide or Visible)


Data Policy use to Related Lists not Hide

Note : Ui Policy Convert to Data Policy but ones convert to data policy ,Ui Policy was
Automatically Deactivate

Data Policy Also Convert To UI Policy

399. What is SLM or (SLA) can you Briefly Explain, Types Of SLA s ?
Service Level Management

Types :
SLA : Service Level Agreement
A Service Level Agreement (SLA) in ServiceNow is a contract between a service
provider and a customer that defines the expected level of service.

OLA: Operation Level Agreement


Operational Level Agreement (OLA) in ServiceNow is an internal agreement between
different teams or departments within an organization
Example: Network, Database
91

UC: Under Pinning Contract


Under Pinning Contract Agreements between service providers and external
suppliers to support the service delivery

400. Difference Between Reponses and Resolution?

Response Time :
The time it takes for a service provider to acknowledge and respond to a customer’s
request or issue after it has been reported.

Example: If a customer submits a support ticket at 10:00 AM and the service


provider responds by 10:15 AM, the response time is 15 minutes.

Resolution Time
The total time taken to resolve the customer’s issue from the moment it was
reported until it is fully resolved.

Example: If a customer submits a support ticket at 10:00 AM and the issue is


resolved by 2:00 PM, the resolution time is 4 hours.

401. SLA Simple Questions ?

Can Run SLA Schedule time? Answer: YES


Can Schedule the SLA ,Caller Time Zone? Answer: YES
What is Schedule SLA Time? Answer: 8/5 (8 Hrs ,5 days/week)
In Schedule SLA Public Holidays Don’t want Run how to achieve?
Answer:
Open to Particular Schedule SLA, configure to child Schedule, add to US Holidays List

402. Difference Between SLA and Metrics?


SLA:
SLAs are agreements with defined targets and conditions,
SLAs are used to manage service delivery and ensure customer satisfaction

Metric :
metrics are ongoing measurements without specific targets.
metrics are used to analyze performance and drive improvements
What are the SLA Conditions?
Start condition
Pause condition
Stop condition
Reset condition

What are The Breach Conditions In SLA?


SLAs can be breached if the service provider fails to meet the agreed performance
targets

403. Print Today Created Incident Numbers and Count , With Out
Aggregate and Encoded Query ?

var gr = new GlideRecord('incident');


gr.addQuery('sys_created_on','>=',gs.beginningOfToday());
gr.query();
var count = 0;
while (gr.next()) {
92

gs.print('Incident Number: ' + gr.number);


count++;
}
gs.print('Total Incidents Created Today: ' + count);

404. What is delegation in user administration ServiceNow?


In ServiceNow, delegation in user administration allows users to assign their
responsibilities to another user temporarily. This is particularly useful when the
primary user is unavailable due to reasons like vacation or illness.

Delegating Approvals and Tasks:


Delegated Development:
Managing Cross-Scope Requests:
User Profile Management:

405. What is variable sets types of variable sets in service catalog?


In ServiceNow, variable sets are collections of variables that can be reused across
multiple catalog items, making it easier to manage and maintain consistency.

Types of Variables Sets:


Single-Row Variable Sets:
A collection of variables that capture data for a single entity in a catalog item
request.
Ideal for forms where each variable set corresponds to a single record or entity.

Multi-Row Variable Sets :


A collection of variables that allow users to input multiple rows of data, displayed in
a table format.
Useful for scenarios where multiple entries of similar data are needed, such as
adding multiple items to a request.

406. Types of Variables in Record Producer and Order Guide?

Single Line Text:

A simple text box for short text input.


Example: “Please provide a reason for the request.”
Multiple Choice:

Radio buttons with multiple options.


Example: “Select your department: Finance, HR, IT.”

Select Box:
A drop-down menu for selecting one option from a list.
Example: “Choose your preferred software suite: Microsoft Office, Google
Workspace.”
Checkbox:

For binary choices (yes/no).


Example: “Do you need admin access?”

Date/Time: Allows users to select a date and time.


Example: “Select the date for the meeting.”

Reference:
Draws data from another table in ServiceNow.
93

Example: “Select the user from the user table.”

Label:
Used to add headings or descriptions within the form.
Example: “Personal Information” as a section header.

HTML:
Allows for rich text formatting using HTML.
Example: Embedding a formatted message or instructions.

List Collector:
Allows users to select multiple items from a list.
Example: “Select the applications you need access to.”

Macro:
Custom variable types created using UI Macros.
Example: Custom widgets or complex input forms.

407. What Is Reference Qualifier, Types of Reference Qualifiers?

In ServiceNow, a reference qualifier is used to filter the data that is returned for a
reference field. This helps in narrowing down the list of records that appear in the
reference lookup, making it easier to find the relevant data. There are three main
types of reference qualifiers:
Simple Reference Qualifier:
Uses basic conditions (AND/OR statements) to filter the data. For example, you can
filter users to show only active users or users with a specific role.

Dynamic Reference Qualifier:


Uses dynamic filter options, which can include encoded query strings, JavaScript, or
script includes. This allows for more complex and flexible filtering based on dynamic
conditions.

Advanced Reference Qualifier:


Utilizes script includes to create more complex and reusable filters. This method is
powerful and allows for advanced logic to be applied when filtering the reference
field

408. use of cascade variable in order guide ServiceNow ?


In ServiceNow, the use of a cascade variable in an order guide is designed to
enhance efficiency and user experience by automatically passing values from the
order guide to the catalog items included in the order

409. Print Recently Created 5 Incidents ?


var gr = new GlideRecord('incident');
gr.orderByDesc('sys_created_on');
gr.setLimit(5);
gr.query();
while(gr.next()){
gs.print('IncidentNumber:'+gr.number);
gs.print('ShortDescription:'+gr.short_description);
gs.print('Caller Id:'+gr.caller_id.name);
gs.print('CreatedOn:'+gr.sys_created_on);
gs.print('--------------------------');
}
94

or
Simpliy Add
gs.print(gr.number);

410. Print Recently Updated 5 Tickets ?

Write Same code .Replace (sys_created_on)


gr.OrderByDesc(sys_updated_on);

411. What is User criteria and what is HR Criteria ?


or
Difference Between User criteria and HR Criteria ?

Simple Answer:
In ServiceNow, User Criteria are used to control access to various elements within
the platform, such as knowledge bases, catalog items, and other records. User
Criteria allow administrators to define which users can access specific content based
on certain conditions.

User Criteria?-Detailed Answer

User Criteria are rules that determine the visibility and accessibility of records for
different users. These criteria can be based on various attributes such as user roles,
groups, locations, Company, Country, Department or custom conditions defined
through scripts

Use Cases for User Criteria

Knowledge Management:
Restricting access to knowledge bases and articles to specific user groups or roles.

Service Catalog:
Limiting the visibility of catalog items based on user attributes such as department
or location.

Custom Applications:
Implementing security measures in custom applications to control who can view or
edit records

What is HR Criteria?
Simple Answer:

In ServiceNow, HR Criteria are used to define the audience for HR content, services,
or cases. This allows administrators to control which users can access specific HR-
related information based on various conditions.

HR Criteria:-Detailed Answer

HR Criteria are rules that determine the visibility and accessibility of HR content,
such as knowledge articles, HR services, and cases. These criteria can be based on
attributes like user roles, groups, locations, or custom conditions defined through
scripts
Uses of HR Criteria

Filtering HR Services:
HR Criteria can be used to filter which HR services are available to specific groups of
95

employees. For example, certain services might only be available to employees in a


particular department or location.
Controlling Access to Knowledge Articles:
HR Criteria can restrict access to HR knowledge articles based on user attributes.
This ensures that sensitive information is only accessible to authorized users.
Managing Lifecycle Events:
HR Criteria can be applied to lifecycle events to trigger specific activities based on
the subject person’s attributes. This helps personalize the onboarding or offboarding
process.
Creating Bulk HR Cases:
HR Criteria can be used to select users when creating bulk HR cases, ensuring that
the cases are only created for the relevant audience
412. What is Fix and Background scripts ?
or
Difference Between Fix and Background scripts ?
In ServiceNow, Fix Scripts and Background Scripts are both used for executing
server-side code, but they differ significantly in purpose, scope, and execution

Fix Script ?
Purpose:
Primarily used for data fixes or one-time updates in the system.
Execution:
Once created and run, the script executes automatically and gets marked as
"complete." It does not run again unless manually modified and re-executed.
Storage:
Stored in the database as a part of update sets and tracked in the platform.
Context:
They run as part of a record in the "Fix Script" table. Can be scripted to make mass
updates or correct data issues.
Rollback:
Can be included in update sets, which allows changes to be rolled back.
Usage:
Used for safely applying scripted changes across different environments during an
update set migration (such as development to production).
Logging:
Logs are recorded in the system, making it easier to track what the Fix Script has
done.
Example:
A Fix Script might be used to update a field on all records within a table when
deploying an update set that requires new data formats or adjustments.

Background Script ?
Purpose:
Used for ad-hoc execution of code, usually by administrators, for testing or one-time
system updates.
Execution:
Manually executed through the "Scripts - Background" module. It can be run any
number of times.
Storage:
Not stored permanently (unless saved manually). Once executed, the script is gone
unless the user saves the code separately.
Context:
Executes in the context of the administrator running the script. It's typically not
included in update sets.

Rollback:
96

No rollback mechanism. Once changes are made, they're final.


Usage:
Useful for quick troubleshooting, testing, or one-time changes to data that don’t
need to be tracked long-term.
Logging:
Limited logging. Administrators should be careful, as running incorrect code in a
background script can affect large amounts of data.
Example:
A Background Script might be used by an admin to clean up records or quickly test a
script before applying it in a more formalized manner.

413. Print Yesterday created incidents Count GlideAggregate ?


(Two Options ,addQuery or addEncodedQuery)

var ga = new GlideAggregate('incident');


ga.addAggregate('COUNT');
ga.addQuery('sys_created_on','>=',gs.beginningOfYesterday());
// ga.addEncodedQuery('sys_created_onONYesterday@javascript
:gs.beginningOfYesterday()@javascript:gs.endOfYesterday()');
ga.query();
while(ga.next()){
var count = ga.getAggregate('COUNT');
gs.print('Yesterday Created Incident Records :'+count);
}

414 : Print Yesterday Created incidents Count ?


Replace : ga.addQuery('sys_created_on','>=',gs.beginningOfYesterday());

415: Print Yesterday Updated incidents Count ?


ga.addQuery('sys_updated_on','>=',gs.beginningOfYesterday());

416 : Print Today Created incidents Count ?


ga.addQuery('sys_created_on','>=',gs.beginningOfToday());

417: Print Today Updated incidents Count ?


ga.addQuery('sys_updated_on','>=',gs.beginningOfToday());

418. What Is Glide API’s in service Now Types of Glide API’s?

By using Glide APIs, we can perform various database operations instead of writing
SQL Queries
Types of Glide API’s
Client side:
Glide Form
Glide User
Glide Ajax
Glide Dialog Window
Glide List
Glide Menu

Server Side:
Glide Record
Glide System
Glide Date
Glide Date and Time
97

Glide Aggregate
Glide Element

419. Removing Duplicate Elements from an Array?


[1,2,3,4,1,3,4,5]

var array = [1, 2, 3, 4, 1, 3, 4, 5];


uniqueArray = array.filter(function(item, index) {
return array.indexOf(item) === index;
});
gs.info(uniqueArray);

420.Print Assignment Group to Sys Id ?


var gr = new GlideRecord('sys_user_group');
gr.addQuery('name', 'network');
gr.query();
while(gr.next()) {
gs.print(gr.sys_id);
}

421. Print sys id to Assignment Group ?


Same Script
Replace
addQuery('sys_id', ' 32 unique sys id')

gs.print (gr.name);

422. Print Current Logged In User Incident Records in Background Script?

// Get the current logged-in user


var currentUser = gs.getUserID();

// Create a GlideRecord object for the Incident table


var gr = new GlideRecord('incident');

// Query incidents created by the current user


gr.addQuery('user', currentUser);
gr.query();

// Print the number of incidents found


gs.print('Total Incidents Created: ' + gr.getRowCount());

// Loop through the results and print the incident numbers


while (gr.next()) {
gs.print('Incident Number: ' + gr.number);
}

Same Script Replace:


gr.addQuery('created_on',currentUser);
or
gr.addQuery('created_by',currentUser);

or
98

// Get the current logged-in user


// var currentUser = gs.getUserID();

// Create a GlideRecord object for the Incident table


var gr = new GlideRecord('incident');

// Query incidents created by the current user


gr.addQuery('user', 'sys_id');
gr.query();

// Print the number of incidents found


gs.print('Total Incidents Created: ' + gr.getRowCount());

// Loop through the results and print the incident numbers


while (gr.next()) {
gs.print('Incident Number: ' + gr.number);

423.What is Glide User and Few Methods ?

Glide User API and methods are useful to get current logged in user details and their
roles. The typical use cases are personalizing feedback to the user and inspecting
user roles.

Glide user typically running from client side (browser).


Very simple API in ServiceNow platform.

Glide User Contains name and role information about the current user.

The global object of Glide User is (g_user).


This API contain different methods to use in our platform.

Determine if a user has a particular role assigned or not.

Using the Glide User API avoids the need to use the slower Glide Record queries to
get user information.

Note: We cannot use it in Business Rules or UI Actions that run on the server

Glide User Methods


firstName() userID()
lastName() hasRoles()
fullName() userName()
hasRole() getFullName()
hasRoleExacctly() getClientData()
hasRoleFromList() getClientName()

Navigate to the Incident table


Open an existing record
Press Ctrl+Shift+j
Open Java Script Executor
Run your code here
Examples :
1.Working with firstName() method
Displays current user First Name.
alert(g_user.firstName);
99

2.Working with lastName() method


Displays current user Last Name.
alert(g_user.lastName);
3.Working with fullName() method
Displays current user Full Name.
alert (g_user.fullName);
4.Working with userID() method
Displays current 32-digit user ID.
alert(g_user.userID);
5.Working with hasRole() method
Displays true if the current user has the specified role.
alert(g_user.hasRole('admin'));
6. Working with fisrtName() and lastName() and
userName() and userID() methods
This script will show the difference between
the firstName, lastName, userName, and userID property values.
alert("First Name = " + g_user.firstName
+ ", \n Last Name = " + g_user.lastName
+ ", \n User Name = " + g_user.userName
+ ", \n User ID = " + g_user.userID);

425. How to Upgrade One version to another version in ServiceNow ?


or
Are You involved any version Upgrade Process please tell me the upgrade
process step by step ?
Upgrading your ServiceNow instance involves several steps to ensure a smooth
transition.

Review Release Notes:


Start by reviewing the release notes of the new version to understand the changes,
enhancements, and potential impacts on your existing instance
.Request Upgrade:
Use the ServiceNow support portal or the clone request feature to request an
upgrade of your temporary instance to the new version
.Clone Instances:
Clone your temporary instance with your production instance to replicate data and
configuration settings
.Test and Validate:
Test and validate the temporary instance for any issues or errors after the upgrade
.Schedule Upgrade:
Schedule the upgrade of your development, test, and production instances using the
support portal
.Monitor Upgrade:
Monitor the upgrade process and resolve any issues that arise
.Complete Upgrade:
Once all instances are upgraded and validated, complete the upgrade process
.(Upgrade process Different Organizations follow the different ways)
But This is the common Way

426. Types of formatters in ServiceNow?

ServiceNow offers a variety of formatters to display information on forms that isn't


directly stored in the record fields

Activity Formatter
Process Flow Formatter
100

Parent Breadcrumbs Formatter


Approval Summarizer Formatter
CI Relations Formatter
Contextual Knowledge Formatter
Variables Formatter

Activity Formatter:
Displays the list of activities or history on a task form
Process Flow Formatter:
Shows the different stages in a linear process flow across the top of a record
Parent Breadcrumbs Formatter:
Provides breadcrumbs to show the parent or parents of the current task
Approval Summarizer Formatter:
Displays dynamic summary information about the request being approved
CI Relations Formatter:
Shows a toolbar for viewing the relationships of Configuration Items (CIs) on the CI
form
Contextual Knowledge Formatter:
Provides relevant knowledge articles based on the context of the current task or
incident
Variables Formatter:
Displays variables and their values in a formatted manner

These formatters help enhance the user interface and provide additional context and
information to users.
427. how you can sum up an array of numbers, including 1234 ?
or
write a array sum of 1234 ?
// Array of numbers
var numbers = [1,2,3,4];

// Function to calculate sum of array


function sumArray(arr) {
var sum = 0;
for (var i = 0; i < arr.length; i++) {
sum += arr[i];
}
return sum;
}

// Calculate and log the result


var totalSum = sumArray(numbers);
gs.info('The sum of the array is: ' + totalSum);

428. [1,2,3,4,5,1,3,5]Remove duplicate from array and replace with some


value in ?
var numbers = [1, 2, 3, 4, 5, 1, 3, 5];
var replacementValue = -1;

var seen = {};


for (var i = 0; i < numbers.length; i++) {
if (seen[numbers[i]]) {
numbers[i] = replacementValue;
} else {
seen[numbers[i]] = true;
101

}
}
gs.info('Replaced Numbers: ' + numbers);

Replace script:
numbers (array) Your choice
replacementValue = -1(0,or -1,or -2 , )Your choice

429. what is schedule jobs in ServiceNow and what is propose?

In ServiceNow, scheduled jobs (also known as scheduled scripts or scheduled jobs)


are automated tasks that run at specified intervals or times. These jobs help manage
and automate various system processes, ensuring routine or repetitive tasks are
executed without manual intervention.

430. What actions can you perform with a scheduled Job?

Scheduled Jobs in ServiceNow can automate a variety of tasks to help keep things
running smoothly.

Data Cleanup: Automatically delete or archive old records.


Reports Generation: Create and email reports on a schedule.
Data Imports/Exports: Schedule imports or exports of data from external sources.
Notification Dispatch: Send out notifications based on time triggers.
Script Execution: Run custom scripts to perform complex operations.
Update Records: Automatically update records based on specific criteria.
Integration Tasks: Automate tasks involving integration with other systems.

431. How can I display all active Incidents opened by the same caller as a
related list on Incident records In ServiceNow?

To display all active Incidents opened by the same caller as a related list on Incident
records in ServiceNow, you can follow these steps

Open an Incident record: Right-click the header of the Incident form.


Configure Related Lists: Select "Configure" > "Related Lists".
Select the Related List: Look for the "Incidents by Same Caller" list in the
available lists. Move it to the "Selected" list
Current.addQuery('caller_id',parent.caller_id);
Save: Click "Save" to apply the changes.

432.Get records where Active is True and Priority is less than or equal to
2?
( Tip : using SQL Operators)

var inc = new GlideRecord('incident');


inc.addActiveQuery();
inc.addQuery('priority', '<=', 2);
inc.query();
while (inc.next()) {
gs.print(inc.number+','+inc.getDisplayValue('priority'));
}
same script (Repalce upto Priority 5)
102

433. What is Transform Maps Scripts ,What are the types of Transform
Script in ServiceNow ?

In ServiceNow, Transform Scripts are used in transform maps to manipulate data


during the process of importing it into the system. Transform scripts help modify,
cleanse, or prepare data before it is written to the target table.
onStart:
Executes at the start of an import before any rows are read (or) This script runs
once before the entire transform begins.
onAfter:
Executes at the end of a row transformation and after the source row has been
transformed into the target row and saved (or) This script runs for each record
after it has been transformed but before it's saved to the database
onBefore:
Executes at the start of a row transformation and before the row is transformed
into the target row (or) It executes for each record before the data is transformed or
mapped to the target table.
onChoiceCreate:
Executes at the start of a choice value creation before the new choice value
is created
onComplete:
Executes at the end of an import after all rows are read and transformed
(or)This script runs once after the entire transformation is complete.
onForeignInsert:
Executes at the start of the creation of a related, referenced record before
the record is created
on Reject:
Executes during foreign record or choice creation if the foreign record or
choice is rejected

434. how can you call an email script in the notification ?


$(mail_script:mail_script_name)

435. What does weight field do in Notification ?


In ServiceNow, the weight field in notifications is used to manage the priority of
notifications when multiple notifications are triggered for the same record and
recipient.
Prevent Multiple Notifications:
If several notifications are configured for the same event and recipient, the weight
field helps determine which notification to send. Only the notification with the
highest weight value is sent
Weight Values:
Notifications with a weight value of zero are always sent, regardless of other
notifications. Non-zero weight values are used to prioritize notifications
Example:
If you have two notifications for the same event, one with a weight of 10 and another
with a weight of 50, only the notification with the weight of 50 will be sent to the
recipient.

436. Write a Glide


Aggregate script to count the number of incidents per priority.

var ga = new GlideAggregate('incident');


ga.addAggregate('COUNT', 'priority');
ga.groupBy('priority');
ga.query();
103

while (ga.next()) {
var count = ga.getAggregate('COUNT', 'priority');
gs.print('Priority: ' + ga.priority + ' Count: ' + count);
}

Trick : Same script using Different Scenarios


Replaced : Priority
437. Tell me the import sets Step by step process in service now?

Create a Data Source: Define the source of the data to be imported.


Load Data: Import the data into an Import Set Table (temporary table).
Import set table: New Table Name or Existing Table
Source of the import: File Based, Data based
Create a Transform Map: Define how the data should map from the Import Set
Table to the Target Table
Auto Map Fields: Specify field-to-field mappings between the Import Set and
Target Table.
Mapping Assist: Map The Source table target Table
Set Coalesce Fields: Decide whether to insert or update records based on
matching fields.
Transform Scripts (Optional): Add scripts to customize data manipulation.
Run the Transform: Execute the data transformation process.
Verify and Correct Errors: Review results and fix errors if necessary.
Cleanup (Optional): Remove the Import Set data after successful transformation.

438. What is Import sets in ServiceNow?

Import sets is an application within ServiceNow used to import bulk data into
ServiceNow tables from various data sources and then map that data into
ServiceNow tables

439. What is a Transform map in service now?

A Transform Map in ServiceNow is a tool used to transfer data from an import set tab
le to a target table. It defines the relationships between fields in the import set and fi
elds in the target table, ensuring that data is correctly imported and mapped.
Transform maps allow you to take data from an external source, loaded into a
temporary import set table, and map it to fields in a table within ServiceNow, such as
Incident, Change, or Configuration Item (CI) tables.

440. Write a reverse array in background scripts 'Reddeppa' (string)?

Script :
var name = 'Reddeppa';
var reversedName = name.split('').reverse().join(''); // Split the string into an array,
reverse it, and join it back
gs.info('Reversed Name:'+reversedName); // Log the reversed string

Explanation:
split(''): Converts the string 'Reddeppa' into an array of characters.
reverse(): Reverses the array of characters.
join(''): Joins the reversed array back into a string.
gs.info(reversedName): Logs the reversed string 'appeddeR' to the system logs.

441. What is the importance of Dot-Walking in ServiceNow?


104

Dot-walking references a field by building a chain of field names separated by dots


(periods). For instance. incident.caller.manager refers to the manager of the person
who made the incident report.
The recommended limit for chain length is three levels.
Example: incident.caller.department
one word Answer :
Reference fields auto populated
example :
'Based on caller selection auto populate to caller all details '
(with out script)

442. What is a dictionary override In ServiceNow ?


Simple Answer:
Dictionary override enables system administrators to define certain field settings on
an extended table differently from those on the parent table without affecting the
parent table or its extended tables.
Detailed Answer:
A dictionary override in ServiceNow is a feature that allows you to customize the
behavior of fields in extended tables It provides the ability to override several
aspects of a field
Reference Qualifiers: Customize the list of values for reference fields.
Dictionary Attributes: Modify attributes like required, hidden, or read-only.
Default Values: Set default values for fields.
Calculations: Define custom calculations for fields.
Default Column Display Values: Customize how fields are displayed in tables.

443. Retrieve Incident details, Data base to Array ,print last 5 or latest 5
incident ?

var incidentArray = [];


var gr = new GlideRecord('incident');
gr.orderByDesc('sys_created_on');
gr.setLimit(5);
gr.query();
while (gr.next()) {
incidentArray.push({
number: gr.getValue('number'),
short_description: gr.getValue('short_description'),
priority: gr.getValue('priority'),
sys_created_on: gr.getValue('sys_created_on')
});
}
gs.print(JSON.stringify(incidentArray));

Note :
if you want to the all incidents, remove the
setLimt(5);

444. what is batch update sets in ServiceNow?


Batch update sets in ServiceNow are a way to group multiple update sets together
so they can be moved, previewed, and committed as a single unit1
This is particularly useful when you have multiple developers working on different
parts of the same application, or when you need to manage a large number of
changes efficiently.
Key Benefits:
Simplifies Management:
105

By grouping related update sets, you can manage them more easily
Previews Changes:
Allows you to preview all changes collectively before committing, reducing the risk of
errors
Efficient Deployment:
Helps streamline the deployment process by moving multiple changes at once

445. What does an update set capture and what doesn't it ?


An update set in ServiceNow is a group of customizations that can be moved from
one instance to another. It helps you package changes made to applications or
configurations. Here’s what an update set captures and what it doesn’t:
Captures:

Form Layouts: Modifications to the layout of forms.


Business Rules: Scripts that run when records are displayed, inserted, updated, or
deleted.
Client Scripts: JavaScript code executed in the user's browser.
UI Policies: Rules to dynamically change form behavior and visibility.
Workflows: Process definitions for handling tasks.
Custom Tables and Fields: Any new tables or fields created.
UI Actions: Buttons and links added to forms and lists.
Report Definitions: Configuration of reports.
Email Notifications: Custom email templates and notifications.
Data Policies: Rules for enforcing data integrity.

Doesn’t Capture:

Data: Actual record data like incidents, users, etc. (use Data Imports for that).
Schedules: Maintenance schedules and work schedules.
System Properties: Some system properties might not be included.
Audit Data: Historical data about record changes.
Attachment: Files attached to records.

446.Could you please explain the Update Set process?


1. Create an Update Set:
Navigate to System Update Sets > Local Update Sets.
Click New to create a new update set.
Name your update set and save it.
2. Capture Changes:
Ensure the update set you created is current (meaning it's active and selected).
Make changes you want to capture (e.g., create new fields, modify forms, update
scripts).
Each change is automatically added to the update set.
3. Review the Update Set:
Once you've made all your changes, review your update set.
Go to System Update Sets > Local Update Sets and open your update set.
Verify that all desired changes are included.
4. Mark the Update Set as Complete:
When you’re satisfied with the changes, mark the update set as complete.
This prevents further changes from being added to it.
5. Export the Update Set:
You can export the update set to an XML file for backup or to transfer it manually.
Use System Update Sets > Local Update Sets to find your set, then select Export to
XML.
6. Import the Update Set:
In the target instance, go to System Update Sets > Retrieved Update Sets.
106

Click Import Update Set from XML to upload the file you exported.
Alternatively, use the Retrieve Update Sets feature if both instances are connected.
7. Preview and Commit:
After importing, preview the update set to ensure it won't cause issues.
Resolve any conflicts that arise.
Once everything looks good, commit the update set to apply the changes

447. What is service catelog in service now?


The Service Catalog in ServiceNow is a feature that allows organizations to create a
user-friendly interface for employees and customers to request services and
products
It's like an online store where users can browse, select, and request various services,
such as IT support, software access, or facility management

Key Features:
Self-Service: Empowers users to request services on their own, reducing the need
for manual intervention
Faster Fulfilment: Streamlines the request process, ensuring quicker service
delivery
Automation: Automates workflows to handle requests efficiently
Visibility: Provides insights into order volume, velocity, and automation levels
Consistency: Ensures standardized request fulfilment processes

448. To print caller (user) details from an incident number or sys_id ?

var gr = new GlideRecord('incident');


gr.addQuery('number', 'INC0010115');
// gr.addQuery('sys_id', 'e190bc79c3d11210874678cc05013195');
// gr.addExtraField('caller_id');
// gr.addExtraField('caller_id.email');
// gr.addExtraField('caller_id.mobile_phone');
gr.addExtraField('caller_id.title');
gr.addExtraField('caller_id.department');
gr.addExtraField('caller_id.manager');
gr.addExtraField('caller_id.location');
gr.addExtraField('caller_id.location.country');
gr.query();
while (gr.next()) {
// gs.print(gr.getDisplayValue('caller_id'));
// gs.print(gr.getDisplayValue('caller_id.email'));
// gs.print(gr.getDisplayValue('caller_id.mobile_phone'));
gs.print(gr.getDisplayValue('caller_id.title'));
gs.print(gr.getDisplayValue('caller_id.department'));
gs.print(gr.getDisplayValue('caller_id.manager'));
gs.print(gr.getDisplayValue('caller_id.location'));
gs.print(gr.getDisplayValue('caller_id.location.country'));

Note :
Take your incident number or sys_id;

Frist Fill The all your details on user profile.

448. What Is a Order Guide, and what Is Its use?


107

An Order Guide in ServiceNow is a tool that allows users to order multiple, related
items as a single request. Think of it as a shopping cart for services and products.
or
In ServiceNow, an Order Guide is a feature that allows users to request bulk item in
the single request and manage a collection of related items or services as a single
bundle or package.

Example: New Hiring, Onboarding


Purpose:

Simplified Ordering: Let’s users request several items in a single, consolidated


process.
Consistency: Ensures related items are ordered together, reducing errors.
Guided Experience: Walks users through a sequence of questions to determine
their needs.
Automation: Automatically generates the necessary tasks for fulfilment.

449. Write a Glide


Aggregate script to count the number of incidents per priority.

var ga = new GlideAggregate('incident');


ga.addAggregate('COUNT', 'priority');
ga.groupBy('priority');
ga.query();
while (ga.next()) {
var count = ga.getAggregate('COUNT', 'priority');
gs.print('Priority: ' + ga.priority + ' Count: ' + count);
}

Trick : Same script using Different Scenarios


Replaced : Priority

450. Working with chooseWindow() method, Display records between two


numbers
Print Active and Priority 1 Incidents from 5 to 10

var gr = new GlideRecord('incident');


gr.addQuery('priority=1');
gr.addActiveQuery();
gr.chooseWindow(5, 10);//The first number included and second number
excluded
gr.query();
while (gr.next()) {
gs.print('Incident Number:'+ gr.number +','+ 'Priority:'+gr.priority);
}
451. How can I create multiple records in incident table via Gild Record?
with different users ?

var incidentData=[
{short_description:'Network
issue',caller_id:'645e03b0eb32010045e1a5115206feb5'},//sys_id
{short_description:'Network
issue',caller_id:'800b174138d089c868d09de320f9833b'},//sys_id
{short_description:'Network
issue',caller_id:'aa826bf03710200044e0bfc8bcbe5dd6'}//sys_id
];
108

for(var i =0;i<incidentData.length;i++){
var gr = new GlideRecord('incident');
gr.initialize();
gr.short_description =incidentData[i].short_description;
gr.priority =5;
gr.caller_id =incidentData[i].caller_id;//use sys_id of the caller
gr.insert();//insert the incident Record
}
452. How can I redirect an action to the current and previous document
using UI Actions?

Set Redirect URL:


Use action.setRedirectURL() to specify the page to open after the UI Action executes.

Set Return URL:


Use action.setReturnURL() to specify the page to open when the back button is
pressed from
the redirect page

453.What does "Global UI Action" refer to In ServiceNow?

A Global UI Action in ServiceNow is a UI Action that is available across the entire


platform, rather than being specific to a particular table or application. These actions
can be used in various forms and lists throughout ServiceNow.

Example:
Submit: A common Global UI Action that allows users to submit forms.
Benefits:
Consistency: Provides a consistent user experience across different parts of the
platform.
Reusability: Can be used in multiple contexts without needing to recreate the
action

454.Background Script to Update a User's Email ?

var gr = new GlideRecord('sys_user');


gr.get('sys_id', 'fcb15895c3461210874678cc050131b2');
gr.email = 'putchakayala@example.com'; // Replace with the new email
gr.update();
gs.print('Email updated successfully.');

455.How can override UI Actions for an extended table?

Create UI Action: On the extended table with the same Action Name.
Add Specific Script: Write script specific to the extended table.
Match Action Name: Ensure the Action Name matches.
Remove UI Action (Optional): Add conditions to exclude the extended table

456. What are some UI Action controls In ServiceNow ?

UI Actions in ServiceNow can be used to create various interactive elements on


forms and lists.

Form Buttons: Buttons on forms that perform actions when clicked.


List Buttons: Buttons on list views that perform actions.
Form Context Menu Items: Options in the form's context menu (right-click).
109

List Context Menu Items: Options in the list's context menu (right-click).
Related Links in Forms: Links that navigate to related records or pages.
Related Links in Lists: Links at the bottom of list views.
Action Choice List Items: Menu items in the action choice list at the bottom of
lists.

457.Updating records without updating "sys" fields ?

var gr = new GlideRecord('incident');


gr.get('number', 'INC0010132');
gr.setWorkflow(false); // Business rules stop
gr.autoSysFields(false); // Auto sys fields updated stop
gr.short_description = 'Updated By System Admin.';
gr.update();

Note :
Replace number
add sys_id

we can do through sys_id,

gr.setWorkflow(false); // Business rules stop


gr.autoSysFields(false); // Auto sys fields updated stop

458. how do you cancel a workflow in ServiceNow ?

To cancel a workflow in ServiceNow, you can use the "cancelContext"

459. Can we send email notification via workflow ?

Send Notification activity into your workflows, you can automate the process of
sending email notifications based on specific conditions and triggers, ensuring timely
communication and updates.

460. What Is workflow versioning In ServiceNow ?

Workflow versioning ensures that you can update and improve workflows while
maintaining continuity and minimizing disruption to ongoing processes. It provides
flexibility and control over how changes are implemented and managed

461. how can you call an email script in the notification ?

$(mail_script:mail_script_name)

462. What does weight field do in Notification ?


In ServiceNow, the weight field in notifications is used to manage the priority of
notifications when multiple notifications are triggered for the same record and
recipient.

Prevent Multiple Notifications:


If several notifications are configured for the same event and recipient, the weight
field helps determine which notification to send. Only the notification with the
highest weight value is sent
Weight Values:
Notifications with a weight value of zero are always sent, regardless of other
notifications. Non-zero weight values are used to prioritize notifications
110

Example:
If you have two notifications for the same event, one with a weight of 10 and another
with a weight of 50, only the notification with the weight of 50 will be sent to the
recipient.

463. How many ways notifications can be triggered ?


Notifications in ServiceNow can be triggered in several ways:

Record Insert/Update/Delete:
Notifications can be triggered when a record is created, updated, or deleted.
Scripted Notifications:
Using business rules or scripts to trigger notifications based on specific conditions.
Scheduled Notifications:
Sending notifications based on a scheduled job or a time-based condition.
Events:
Notifications can be tied to events, which are generated by other scripts or
workflows

3]Explain any complex scenarios which you did?


4]explain your roles and responsibility in your project ?
5]which was the complex customisation you have done in your development?
based on that they will ask more que on that.
A]in incident table u have 3 custom fields x,y,z if u select x and y based on that data should be
populated in z explain different methods you will follow for this Scenario(in case of coding they
will
ask client script and BR which you will follow and where you will store the values of X and Y in
mean while)
6]How to get sys_id of incident form using script include and set to custom table?
7]if I want to filter assignment_group users as per type of group what i should do?
8]If I want retrive each state time of incident what should I do?(example states:new,in progress, on
hold,etc)

*Business rules
1]If I want to close parent incident I want to check that all child incident are closed before closing
parent incident.(need to check practiacal)
2]what is the use of g_scratchpad ,where you will use , you will use in display BR or other BRs?
3]How to change the state of an incident to resolved, when a related change is set to close?
9]Introduce yourself and also explain your recent project
10] In Which ITSM module approval is not in place?
11]What are the different ways of migrating code from one instance to another?
Which modules/tables are used for each of these steps?
12]Which instance have you worked recently?
13]There is a field on Incident form where we can specify day(‘Mon, tue, we…’), according to that
day, a notification should get sent to caller.
If the meeting does not happens then again a new notification should get send like Meeting does
not happened.
14]Custom field capture in audit or not
111

You might also like