Servicenow Development Latest Book by UCS Infotech
Servicenow Development Latest Book by UCS Infotech
2
Why I am writing this book
I have been working since 10+Years on service now platform into various
applications and modules and deep look into the platform. These all days I faced
lots of struggles but did not find any solutions. There is no step by step guide
available in market. Finally, I decided to write step by step instruction servicenow
Development guide that will help to people who already working on platform
also for new learners
My Service Now LIVE book Development will provide step by step instructionsin
topic wise and very crystal clear, New learners and student are felling happy with
my book We have worked on this practice Service Now LIVE book, each topic is
categorized into simplified very practical steps that we use with many customers
and students. Our approach has improved practice make it easy in this book we
will learn how to get hands on experience on each applications and modules. It
was mainly designed for everyone who wants to become a master in service now
with practical exercises
3
This book for Whom
4
ServiceNow Live Book
Second Edition (Development)
Cover Page Design & Illustrations: Mr. Lakshmi Narsu @ 2024 C.P. (UCS
INFOTECH, SHRESTA EDUTECH). All Rights Reserved. Although every care
has been taken to avoid errors and omissions, this publication is being sold
on the condition and understanding that the information given in this book
is merely for reference and must not be taken as having authority of or
binding in any way on the authors, editor, publisher or sellers.
Neither this book nor any part of it may be reproduced or transmitted in any
form or by any means, electronic or mechanical, including photocopying,
microfilming and recording or by any information storage or retrieval system,
without prior permission in writing from the copyright holder.
Published by
(UCS INFOTECH, SHRESTA EDUTECH)
Office Address
Flat no: 101, 1st Floor, Shanti Nilayam, SAP St, Gayatri Nagar, Ameerpet,
Hyderabad, Telangana, India
5
Lesson-01
Glode API & Glide
Record
Agenda
Glide API Overview
Types of Glide API’s
What is Glide Record and Usage
Glide Record Architecture
API Mapping
Glide Record Methods
Glide Record Exercises
Each API contain lot of methods and each method perform different operations
in Service Now Applications
Glide API’s
Client Side Server Side
Glide Form Glide Record
Glide User Glide System
Glide Ajax Glide Date
Glide Dialog Window Glide Date and Time
Glide List Glide Aggregation
Glide Menu Glide Element
7
Glide Record Architecture
Instead of passing SQL Queries, we can use Java Script
8
Glide Record Methods
Query() Insert()
addQuery() deleteRecord()
addActiveQuery() update ()
addEncodedQuery() initialize ()
addInactiveQuery() deleteMultiple ()
next() updateMultiple()
get() addNullQuery()
setLimit() addNotNullQuery()
orderBy() autoSysFields()
orderByDesc() canCreate()
getRowNumber() canRead()
hasNext() canWrite()
getRowCount() canDelete()
chooseWindow() changes()
addjoinQuery() Find()
getClassDisplayValue() getAttribute()
getDisplayValue() getElement()
getLabel() getFields()
getLink() getValue()
getLocaton has Attachments()
getRecordClassName() insertWithReferences()
getRelatedLists() isNewRecord()
getRowNumber() isValid()
getTableName() isValidField()
restoreLocation() isValidRecord()
saveLocation() newRecord()
setAbortAction() setDisplayValue()
setLocation setForceUpdate()
_next setValue()
_query setWorkflow()
Note: Need to use Script-Background application
9
Glide Record Exercises
Result→ 30
3. Working with query () method
var inc = new GlideRecord ('incident')
//GlideRecord is main Oject and Incident is Table
inc.query (); //Query is execute in the table
while (inc.next ()) {//Loop will runs on the table
gs.print (inc.number); //Printing all incidets
}
10
4. Working with query () and addQuery() and next() and
While methods
11
6. Working with addEncodedQuery () method
Step-6: Script
var inc = new GlideRecord ('incident');
inc.addEncodedQuery('active=true^category=software^priority=1');
inc.query();
while(inc.next()){
gs.print(inc.number);
}
14
Result→Print all records where our condition meet like (<=2 and CONTAINS)
15
8. Working with addActiveQuery () method
16
while (inc.next ()) {
gs.print (inc.number);
}
Example: 2
17
Result→ Print our encodedQuery
19
Result→ Print only latest 10 records created from given table
Example-2
21
gs.print ('Active users are:' + inc.getRowCount ());
22
Result→ Print the value of field from particular table
23
Exercise-19: This method will return true if iterator
have more elements.
Result→ Create a new record and Set a value into category field
25
Result→ Print current record column value
26
Result→ Create new record and print new record number
27
27. Working with isValid () method
Result→ True
Example: 2
var inc = new GlideRecord ('uday');
gs.print (inc.isValid ());
Result→ False
28
Result→ Boolion value is True
29
30. Working with isValidRecord () method
Exercise-31: Creates a new GlideRecord record, sets the default values for the
fields, and assigns a unique ID to the record.
30
gs.print (inc.number);
Result→ Print all records where the specific field value is Null
31
var inc = new GlideRecord('incident');
inc.addNotNullQuery ('short_description')
inc.query ();
while (inc.next ()) {
gs.print (inc.number)
}
Result→ Print all records where the specific field value is not null
32
35. Working with updateMultiple () method multiple
record
Exercise: 2
33
36. Working with deleteRecord () method single record
34
38. Working with canCreate () method
35
Result→True (user have permission to write incident record)
Enables or disables the update to the fields, this is often used for
manually updating field values on a record while leaving historical
information unchanged.
sys_updated_by
sys_updated
These all system fields cannot
sys_updated_on
update when we updated
sys_mod_count particular record via script
sys_created_by
sys_created_on
38
Lesson-02
Glide Form
Agenda
Glide Form Overview and Usage
Glide Form Methods
Glide Form Exercises
39
Glide Form Overview and usage (g_form)?
• The Glide Form is client side API, mainly used to change default behavior
of the current record
• GlideForm methods are only running on the client side (Browser).
• The global object g_form is used to access GlideForm methods.
• These methods are used to make custom changes to the form view of
records. All validation of examples was done using Client Scripts.
• g_form methods frequently using in Client Scirpts
• g_form methods can use in catalog client script also
40
Glide Form Exercises
This method is used to get specific field value from current form.
Alert (g_form.getValue ('category')); //Alert is used to print the out put
41
3. Working with setDisabled () method
42
7.Working with isMandatory () method
Defines whether the particular field is mandatory and must contain a
value before the record can be saved or submitted display bullion
(True/False)
g_form.isMandatory ('category');
43
11. Working with enableAttchments () method
Allows customer file attachments to be added. Shows the paper clip
icon.
g_form.enableAttachments ();
g_form.clearMessages ();
44
16. Working with clearValue () method
Remove value from specific field on the form
g_form.clearValue('category');
g_form.hideRelatedLists ();
g_form.showRelatedLists ();
45
20. Working with showFieldMsg () method
This method will display Informational or Error or Warn message
under the specified form field (either a control object or the
name of the field). If the control or field is off the screen, the form
is scrolled to the field.
The showErrorBox () method is an alternate method that does
not require the type parameter.
46
24. Working with getSections () and
setSectionDisplay () methods
47
26. Working with getUniqueValue () method
It will return the sys_id of the record displayed in the form.
alert (g_form.getUniqueValue ());
Adding the same item twice is prevented; however, you can add
the same icon with a different title.
48
Lesson-03
Glide User
AgenAgenda
Glide User Overview and Usage
Glide User Methods
Glide User Exercises
49
Glide User Overview and Usage
• 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 service now platform
• Typically used in client scripts and UI policies but is also found in UI
actions that run on the client.
• 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 in Business Rules or UI Actions that run on the server.
50
Glide User Exercises
51
5. Working with hasRole () method
Display true if the current user has the specified role
alert (g_user.hasRole ('admin'));
53
Glide User Scoped or Global Exercises
54
Returns the user's email address.
var cu = gs.getUser();
gs.print(cu.getName());
55
var cu = gs.getUser ();
gs.print (cu.getDisplayName());
56
12. Working with getUserByID () method
Returns the user object associated with the passed-in user
ID (sys_id in sys_user) or user_name.
58
Lesson-04
Glide System
Glide System
Glide System Overview
Glide System Methods
Glide System Excercises
59
Glide System Overview
• Glide System API running from server side
• This API will provide different methods to get information about the
system, the current Logged in user, etc.
• The Glide System global object is gs
• Many of the Glide System methods facilitate the easy inclusion of
dates in query ranges
• Often used in filters and reporting.
Glide System
addInfoMessage() endOfLastMonth()
addErrorMessage() endOfLastWeek()
getUser() endOfLastYear()
getUserName() endOfNextMonth()
getUserID() endOfNextWeek()
getUserDisplayName() endOfNexYear()
hasRole() endOfThisYear()
error() endOfThisQuarter()
eventQueue() endOfThisMonth
eventQueueScheduled() hoursAgo()
getErrorMessage() hoursAgoStart()
getSession() minutesAgoEnd()
getSessionID() minutesAgoStart()
setRedirect() monthsAgo()
Info() monthsAgoStart()
isDebugging() nil()
isInteractive() yearsAgo()
isLoggedIn() yesterday()
getAvatar() Warn()
setProperty() tableExists()
Practically Work with these all methods
Note: Need to use Script-Background
application
60
Glide System Exercises
Example: 2
61
3. Working with getUser () method
Returns a reference to the user object for the current user.
var currentUser = gs.getUser();
gs.print(currentUser.getEmail());
62
7. Working with getUserNameByUserID () method
Returns the username based on a user ID.
gs.print (gs.getUserNameByUserID ('admin'));
63
10. Working with isInteractive () method
It will check if the current session is interactive or not
1. Interactive session is when a user logs in using the service now
log-in screen
2. Non-interactive session is using a SOAP request to retrieve data
from servicenw platform.
gs.print (gs.isInteractive ());
Example: 2
64
11. Working with getAvatar () method
Displays the file path to the current user's avatar.
This method will clear all session messages saved using addErrorMessage
() or addInfoMessage ().
Session messages are shown at the top of the form. In client side scripts,
use g_form.clearMessages () to remove session messages.
gs.flushMessages ();
This method will get the date and time for the beginning of last month in
GMT.
gs.print (gs.beginningOfLastMonth ());
Output
65
14. Working with beginningOfLastWeek () method
Returns the date and time for the beginning of last week in GMT.
gs.print (gs.beginningOfLastWeek ());
Output
Output
Output
66
17. Working with beginningOfThisMonth () method
Get the date and time for the beginning of this month in GMT.
gs.print (gs.beginningOfThisMonth ());
Output
Output
Output
Returns the date and time for the beginning of this year in GMT.
gs.print (gs.beginningOfThisYear());
Output
67
21. Working with beginningOfToday () method
Retrieves the date and time for the beginning of today in GMT.
gs.print (gs.beginningOfToday());
Output
gs.print (gs.beginningOfTomorrow());
Output
Output
68
25. Working with daysAgoEnd () method
Returns a date and time for the end of the day a specified number of
days ago.
Output
Output
gs.print(gs.endOfLastMonth());
Output
69
28. Working with endOfLastWeek () method
Returns the date and time for the end of last week in GMT.
gs.print (gs.endOfLastWeek());
Output
Output
Output
Output
70
31. Working with endOfNextYear () method
Returns the date and time for the end of next year in GMT.
gs.print (gs.endOfNextYear ());
Output
Returns the date and time for the end of this month in GMT.
gs.print (gs.endOfThisMonth());
Output
Output
Output
71
35. Working with endOfThisYear () method
Returns the date and time for the end of this year in GMT.
gs.print (gs.endOfThisYear ());
Output
Output
Output
Output
72
39. Working with getDisplayColumn () method
Retrieves the display column for the table.
gs.print (gs.getDisplayColumn ('incident'));
Output: number
Output
Output
73
42. Working with getInitials () method
It will return the user’s initials
OutPut
Output
74
Output
Output
Output
Output
This method will check whether the date is the first day of the month.
75
gs.print (gs.isFirstDayOfMonth (2020-01-25));
Output
Checks whether the date is the first day of the week. This
uses the ISO standard of Monday being the first day of the
week.
Output
gs.print (gs.isFirstDayOfYear(2020-04-12));
Output
Output
76
52. Working with isLastDayofWeek () method
Checks whether the date is the last day of the week.
gs.print (gs.isLastDayOfWeek (2020-04-19));
Output
Output
Output
Output
77
56. Working with nowDateTime () method
Gets the current date and time in the user-defined format.
gs.print (gs.nowDateTime ());
Output
Output
gs.setRedirect("com.glideapp.servicecatalog_cat_item_vie
w.do?sysparm_id=d41ce5bac611227a0167f4bf8109bf70&
sysparm_user=" + current.sys_id + "&sysparm_email=" +
current.email);
78
Lesson-05
Glide Sesson
Glide Sesson
Glide Sesson Overview
Glide Sesson Methods
Glide Sesson Excercise
79
Glide Session Overview and Usage
The Glide Session allows us to find information about the current session
Glide Session API provides a way to find information on current session.
Glide Session
clearClientData() isLoggedIn()
getClientData() putClentData()
getLanguage() getTimeZoneName
getRoles() isInteractive()
Work with these all methods
Note: Need to use Script-Background
application
Code
var myData = gs.getSession ();
myData.putClientData('userName','Uday');
var clientData = session.getClientData('userName')
gs.print (clientData);
80
Output
Code
session.clearClientData ('userName');
clientData = session.getClientData('userName');
gs.print (clientData);
81
Output
Code
var session = gs.getSession ();
var language = session.getLanguage();
gs.info (language);
Output
The list of roles does not reflect any changes made during the
current user session. To get the updated list of roles, the user
must log out and log back in.
Output
82
5. Working with getTimeZoneName() method
This method is used to gets the name of the session's time zone.
Code
var session= gs.getSession ();
var timeZone = session.getTimeZoneName();
gs.print (timeZone);
Output
Code
var interActive = gs.getSession().isInteractive();
gs.info (interActive);
Output
Output
Code
var session = gs.getSession();
var clientData = gs.putClientData('userName','Uday')
gs.print (clientData);
84
Lesson-06
Glide Date
Glide Date
Glide Date and Usage
Glide Date Methods
Glide Date Excercises
85
Glide Date Overview and Usage
Glide Date classes will provide methods for performing operations on Glide
Date objects, such as instantiating Glide Date objects or working with Glide
Date fields.
• These methods are used to work with date fields on form
• Glide Date global oject is GlideDate
Code
86
var date = new GlideDate();
gs.print (date);
Code
var date = new GlideDate ();
gs.print (date.getByFormat ('dd-MM-yyyy'));
Output
Output
87
var glideDate =new GlideDate ();
gs.print (glideDate.getDisplayValue());
Output
Code
var glideDate =new GlideDate();
gs.print (glideDate.getDisplayValueInternal());
Output
Code
var glideDate =new GlideDate();
gs.print (glideDate.getMonthNoTZ());
Output
88
7. Working with getValue () method
Gets the date value stored in the database by the GlideDate object in the
internal format, yyyy-MM-dd, and the system time zone, UTC by default.
Code
var glideDate =new GlideDate();
gs.print (glideDate.getValue());
Output
Code
var glideDate =new GlideDate();
gs.print (glideDate.getYearNoTZ());
Output
89
9. Working with setDisplayValue () method
Sets a date value using the current user's display format and time zone.
Code
var glideDate =new GlideDate();
glideDate.setDiaplayValue();
gs.print (glideDate.getValue());
Code
var glideDate =new GlideDate();
glideDate.setValue('2020-04-18');
gs.print (glideDate.getValue());
Output
90
11. Working with subtract () method
Gets the duration difference between two GlideDate values.
Code
var firstDate = new GlideDate();
firstDate.setDisplayValue('2020-01-25');
var secondDate = new GlideDate();
secondDate.setDisplayValue('2020-01-29');
Output
91
Lesson-07
Glide Date and Time
Agenda
GlideDateTime Overview and usage
GlideDateTime Methods
Glide Date Time Exercises
92
GlideDateTime Overview and usage?
The GlideDateTime class provides methods for performing operations on
GlideDateTime objects, such as instantiating GlideDateTime objects or
working with glide_date_time fields.
GlideDateTime Methods
Output
94
gdt.addDays (4)
gs.print (gdt);
Output
Code
var gdt = new GlideDateTime("2020-01-28 08:00:00");
gdt.addDaysLocalTime(4)
gs.print(gdt.getLocalDate());
Output
95
Code
Output
Code
var gdt = new GlideDateTime();
gdt.addMonths(2)
gs.print(gdt.getDate());
Output
96
Output
addMonthsUTC ()
Output
Output
97
Code
Output
Code
var gdt = new GlideDataTime();
gdt.addWeeksLocalTime(5);
gs.print(gdt.getValue());
Output
addWeeksUTC ()
Output
98
Adds a specified number of years to the current GlideDateTime object. A
negative parameter subtracts years.
Code
Output
addYearsLocalTime ()
Output
addYearsUTC ()
99
Output
Code
var initDate = new GlideDateTime ("2011-08-01 12:00:00");
var compDate1 = new GlideDateTime("2011-08-01 12:00:00");
var compDate2 = new GlideDateTime("2011-07-31 12:00:00");
var compDate3 = new GlideDateTime("2011-08-04 16:00:00");
Output
100
13. Working with equals () method
Compares an object with an existing value for equality.
Code
var gdt = new GlideDateTime("2020-04-19 00:00:00");
gs.print (gdt.equals ("2020-04-15 00:00:00"));
Output
Code
Output
Code
var gdt = new GlideDateTime();
gs.print(gdt.getDayOfMonth());
101
Output
Code
var gdt = new GlideDateTime();
gs.print(gdt.getDayOfMonthLocalTime());
Output
getDaysOfMonthUTC ()
Output
Code
102
var gdt = new GlideDateTime();
gs.print (gdt.getDayOfWeek());
Output
getDayOfWeekLocalTime ()
Output
getDay OfWeekUTC ()
Output
103
Use getDaysInMonthLocalTime
() and getDaysInMonthUTC() instead of this method.
getDaysInMonthsLocalTime ()
Output
getDayInMonthsUTC ()
Output
Output
Output
105
24. Working with getErrorMsg () method
This method is used to gets the current error message.
Output
Output
106
Output
Output
Output
107
29. Working with getValue () method
Gets the date and time value stored by the GlideDateTime object
in the internal format, yyyy-MM-dd HH:mm:ss, and the system
time zone, UTC by default.
Output
Output
108
31. Similarly working with getYearLocalTime() and
getYearUTC() method
getYearLocalTime()
Output
getYearUTC()
Output
Output
109
33. Working with setDayOfMonth () method
Sets the day of the month to a specified value.
Use setDayOfMonthLocalTime(day) and setDayOfMonthUTC(
day) instead of this method.
var gdt = new GlideDateTime();
gdt.setDayOfMonth(4);
gs.print (gdt.getDayOfMonth());
Output
Output
setDayOfMonthUTC ()
Output
110
35. Working with setDisplayValue () method
Sets a date and time value using the current user's display
format and time zone.
Output
Output
111
37.Similarly working with
setMonthLocalTime () and
setMonthUTC () method
setMonthLocalTime ()
Output
setMonthUTC ()
Output
Output
112
39. Working with setYear () method
Sets the year stored by the GlideDateTime object to a
specified value using the UTC time zone.
var gdt = new GlideDateTime();
gdt.setYearUTC(2020);
gs.print (gdt.getYearUTC ());
Output
Output
113
41. Working with toString () method
Returns the date and time value stored by the
GlideDateTime object in the internal format, yyyy-MM-dd
HH:mm:ss, and the system time zone, UTC by default.
Output
114
Lesson-08
Glide Aggregation
Agenda
Glide Aggregate Overview
Glide Aggregate Methods
Glide Aggregate Exercises
115
Glide Aggregate Overview
GlideAggregate enables you to easily create database aggregation
queries.
The scoped GlideAggregate class is an extension of Glide
Record and provides database aggregation (COUNT, SUM, MIN,
MAX, AVG) queries. This functionality can be helpful when
creating customized reports or in calculations for calculated
fields. The GlideAggregate class works only on number fields.
116
Exercise-2: The following code shows how to add
aggregates to a query on the category and software fields
in the Incident [incident] table.
117
Exercise-3: Number of incidents varies depending on the
current state of the incident table
118
Result:
119
Exercise-5: Count all incidents with each category
Result
120
Exercise-6: Count all incidents with each category
121
Result
122
Lesson-09
Client Scripts
Agenda
Client Script Overview
Types of Client Scripts
Why client scripts
Client side Glide API classes
Client Script Excercises
123
Client Scripts OverView
Client Scripts are allowing to user to run Java Script on client side (Browser
Window) when client based events are occurred or executed
Such as when a form was, Loads and or submitted form and when a field
value is changed and when you edit cell value from list view
We can be able to use client scripts to configure Forms, Form Fields and
Field Values while user is using any particular form.
124
Why Client Scripts?
Client scripts can be reducing the amount of time it takes while a user to
complete a form.
If we create client scripts is used controlling a field values on a form, you
must use another method to control these field values in a list.
The g_scratchpad object will pass the information from the Server to the Client,
when we want to get required information that is not available on the
particular form.
With the exception of onCellEdit () client scripts, remaining client scripts only
apply on particular forms and search pages, onLoad (), onChange (), onSubmit
()
If you want create a client script to controlling field values on a form, you should
be use one of these other methods to control field values when on a list.
1. We can create an access control rules to restrict user who can read and edit
field values on your form. Create a business rules to validate content in form.
2. Create a UI Policy and Data policy to validate content in form.
3. Create an onCellEdit () client script to validate content in list view.
4. Disable list editing for the particular table
125
Client side Glide API classes
GlideAjax : This object is used to execute server-side script from the client
GlideList2 : Used to customize (v2) lists, including normal lists and related lists.
GlideUser : This object is used to get session information about the current
user and roles.
126
4. Fill Clients Scripts Form
5. Name: Initial Form Validation
6. Table: Incident
7. UI Type: All
8. Type: OnLoad
127
9. Script
128
Exercise: 2
Requirement
4.Script
129
5. Open New Incident form check the validation
6. Incident → Click on Create New
7. Change state value to On-Hold
8. Check on hold reason field is Visible and Mandatory
9. Follow below screen shot for reference
130
Exercise: 3
Requirement:
Any customer after submitted (Priority 1-Critcal) incident
1. We need to display one alert message to customer about Criticality (Are
you submitting Priority one ticket)
2. Include Ok and Cancel Buttons also
4. Script
131
5. Open New Incident form check the validation
6. Incident → Click on Create New
7. Select Impact-1 and Urgency-1
8. Click on Submit Button
9. Follow below screen shot for reference
132
Exercise: 4
Requirement
1. When Incident state is Resolved Then Resolution Code and Resolution
Notes are mandatory
2. Assigned to and Assignment Group should not be seen
4. Script
133
5. Open New Incident form check the validation
6. Incident → Click on Create New
7. Change state value to Resolved
8. Check validation on below screen shot for reference
134
Exercise: 5
Requirement
1. If Selected Caller is VIP in Incident table, then Impact and Urgency field
values setup
1-High.Impact-High and Urgency High then Priority 1- Critical set
automatically
2. Impact and Urgency fields should be read only on above condition
3. Display on alert message on browser that is (Caller is VIP!)
Developer TIP: Make one Caller VIP (Fred Luddy) from user record (Already
we know how to do this)
Client Script Type
OnChange
Procedure
1. Navigate to System Definition→Client Scripts
2. Open Client Scripts
3. Click on New
4. Script
135
5. Open New Incident form check the validation
6. Incident → Click on Create New
7. Select any VIP Caller like Fred Luddy
8. Check validation on below screen shot for reference
136
Exercise: 6
Requirement
1. When customer selected Incident Category is Inquiry/Help,
then Subcategory field should be hide
2. Remove choice 1-High from Impact and Urgency fields
3. Display an Error Message below impact field (Low impact is not
preferring high priority)
Client Script Type
OnChange
Procedure
1. Navigate to System Definition→Client Scripts
2. Open Client Scripts
3. Click on New
4. Script
137
Exercise: 7
Requirement
1. When current incident state is New then remove all choices from State
fieldChoices need to be removed (In-Progress, On-Hold, Resolved,
Closed, Cancelled).
3. When current incident State is Resolved, then remove these all choices
Choices need to be removed (New, In-Progress, On-Hold, Cancelled)
4. When current incident State is Closed, then state field should be Read-
only
138
Client Script Type
OnLoad
Procedure
1. Navigate to System Definition→Client Scripts
2. Open Client Scripts
3. Click on New
4.Script
139
1. Open New Incident form check the validation
2. Incident → Click on Create New
3. If current incident state is New, then rest of states should not be seen
4. If current incident state is In-Progress or On-Hold, then New and
Closed States should not visible
5. In Resolved state display only Closed state value
6. If state is Closed State filed should be Read-only
140
Exercise: 8
Requirement:
When incident state is Closed then all fields make read-only
1. If incident state is closed, assigned to, assignment group, category,
subcategory, impact, urgency, contact type, short description, caller field
are make read-only
2. Attachment Icon should not see in Closed record
3. All Related Lists should be hide
4. Script
141
1. Open New Incident form check the validation
2. Incident → Click on Resolved Module
3. Change the state value to Closed then some field are display in Read-only
4. We couldn’t see Attachment Icon and Related Lists
142
Exercise: 9
Requirement:
When customer changed incident Priority field value then work notes should
be mandatory
1. If record is New or Form isLoading or oldValue == newValue same
then work notes field should not mandatory
2. When customer changed Priority 1 to 2 then work notes field make
Mandatory
Procedure
1. Navigate to System Definition→Client Scripts
2. Open Client Scripts
3. Click on New
4. Script
143
5. Open New Incident form check the validation
6. Incident → Click on Create New Module
7. Change the Priority to 1 then Save it
8. Again change the Priority to 2 then get info message to fill work notes
mandatory
144
Exercise: 10
Requirement
User restriction, not allowing update the cell value from Incident List View
1. Any customer tries to change incident state value to 7- Closed action will
be cancel and display alert message to customer
2. Alert Message (System not allow user to update cell value)
4.Script
145
4. Open Incident List View and check the validation
5. Incident → Click on All Module
6. Change the state value to 7-Closed
7. Get Error Message (System not allowing user to update cell value)
Exercise: 11
Requirement:
1. When user submit incident form need to display Assigned to Name as
alert message
2. Give confirmation message also
4. Script
146
5. Open New Incident check the validation
6. Fill Assigned to field and Submit form
7. Display alert message and and given confirmation message
147
Exercise: 12
Requirement:
Auto assign the value to Assignment Group depends on category
1. If Category is Network auto assigned Network Assignment Group
2. Category is Hardware auto assigned to Hardware Assignment Group
3. Category is Database auto assigned to Database Assignment Group
4. Category is Software auto assigned to Software Assignment Group
4. Script
148
5. Open New Incident check the validation
6. Select the Category is Software then ticket is auto assign to Software
Assignment Group
7. Select Remaining Category Also Similarly check the validation
149
Exercise: 13 Table Incident
Requirement: Auto set Caller value into caller field depends on current
logged in user
1. Display alert message say Hello message with logged in user full name
2. Caller field should be Read-Only
4. Script
150
5. Open New Incident check the validation
6. Click on Create New module
7. Click on Ok button
Exercise: 14
Requirement
Date Validation between two fields for Incident table
1. Create Two custom fields in incident tables (Start Date, End Date)
2. Start date should be always before End date
3. Start date should not equal to End date
4. Give me Error Message under End date field
151
4. Script
152
Exercise: 15
Requirement:
Hide Resolution Information section when state is not equal to Resolved
1. When Page Is Loading and state is not equal to Resolved then hide
Resolution Information section otherwise display section
153
4. Script
154
Lesson-10
UI Actions
Agenda
UI Actions Overview
UI Actions Controls
UI Actions on Server Side
UI Actions on Client Side
UI Actions Excercises
Sending Notifications Through UI Actions
155
UI Action Overview
UI Actions defines Buttons, Hyperlinks, list menus and form context menus
Configure UI actions to make the UI more interactive, customized, and specific
to user activities. Service now Administrator and UI Actin Admin will create
UI actions in service now platform
UI Action Controls
We can create UI Actions for these all places:
156
Form UI Actions
List UI Action
157
UI Action on Server Side
Service now Admin or Developer can create new UI Action or modify
existing one
Exercise-1
There should be a button on Incident form to assigned ticket to
current logged in user
Procedure
158
9. Script
current.assigned_to = gs.getUserID ();
current.update ();
159
UI Action on Client Side
UI action can run on client side also following below example
Exercise-2
There should be a button on Incident form to assign the ticket to
current logged in user
Procedure
1. Navigate to System Definition→UI Actions
2. Click on New
160
15. Onclick: autoAssignment()
16. Script
function autoAssignment () {
var user = g_user.userID;
g_form.setValue('assigned_to', user);
g_form.setValue('work_notes', "such as assigning to me");
g_form.save();
}
161
Exercise-3
There should be a button on incident form to create new Child Incident from
being on the Parent incident form. Once created child incident immediately it
should be redirect to child incident
Procedure
1. Navigate to System Definition→UI Actions
2. Click on New
162
3. Fill UI Action form
4. Name: Create Child Incident
5. Table: Incident
6. Order:800
7. Action Name: create_childIncident
8. Show Update: Checked
9. Active: Checked
10. Form button: True
11. Script
163
12. Click on Submit
Exercise-4
There should be a UI action on incident record to create 3 incident tasks
automatically associated with same incident.
Procedure
1. Navigate to System Definition→UI Actions
2. Click on New
164
9. Active: Checked
10. Form button: True
11. Script
165
12. Click on Submit
13. Check the result
Exercise-5
Create new UI Action to open problem form from Incident table record
Procedure
1. Navigate to System Definition→UI Actions
2. Click on New
12. Script
var url = '/problem.do?sys_id=-1';
action.setRedirectURL(url);
167
Exercise-6
Create new UI Action to send notification to caller about incident state
changes
1. Create Event Registsry
2. Create Email Notification
3. Create UI Action
Procedure
1. Navigate to System Policy→Events→Registry
2. Click on New
168
Creating Notification
Procedure
1. Navigate to System Notification→Email→Notification
2. Click on New
169
When to send
7. Send when: Event is fired
8. Event name: send.notification.assignedto
9.Users: [email protected]
10. Send event creator: true
170
11. Subject: State changes to inprogress state:${state}
12. Assigned to: ${assigned to}
Creating UI Action
Procedure
1. Navigate to System Definition→UI Action
2. Click on New
171
3. Fill UI Action form
4. Name: State set to inprogress
5. Table: Incident
6. Order:100
7. Action Name: state_inprogress
8. Show Update: Checked
9. Active: True
10. Form button: True
11. Script
current.state = 2;
current.update();
gs.eventQueue('send.notification.assignedto',current,gs.getUserName
());
172
UI Actions on Client and Server side
There should be a UI Action on incident table to Resolve incident ticket
Procedure
1. Navigate to System Definition→UI Actions
2. Click on New
173
Script
function resolveIncident(){
//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);
function serverResolve(){
current.incident_state = IncidentState.RESOLVED;
current.state = IncidentState.RESOLVED;
current.resolved_by = gs.getUserID();
current.update();
}
174
175
Lesson-11
Scheduled Jobs
Agenda
Scheduled Jobs Overview
Scenarios where we can use schedule jobs
Scheduled Jobs Tables
Scheduled jobs states
Who will create new scheduled job
Creting New Scheduled Job
How to share report through schedule job
Create schedule job template
Send notification through scheduked Job
176
Scheduled Jobs Overview
178
4. Fulfil scheduled jobs form
5. Click on Submit
179
Before testing this, we should set up particular
time zone for this instance
180
4. Fulfil scheduled jobs form
5. Name: All resolved incidents should get closed automatically
6. Active: True
7. Run: Weekly
8. Friday:
9. Time Zone: GMT
10. Time: 16:20:00
11. Click on Submit
181
12. Run this Script
var eq = 'resolved_atONLast 6
months@javascript:gs.beginningOfLast6Months()@javascript:gs.endOfLast
6Months()';
gr.state = '7';
gr.work_notes = 'All resolved incidents are closing through scheduled
jobs';
gr.update();
}
182
Create a new scheduled Job
Create an incident ticket every week on Saturday in the mng 9AM
Exercise: 3
Create an incident ticket every week on Saturday in the mng 9AM
Procedure
1. Navigate to System Definition > Scheduled Jobs.
2. Click New.
3. Select and click on Automatically generate something (a change, an
incident, a ci, etc) from a template
183
10. Create Template
184
11. Name: Network Servers maintenance
12. Table: Incident
13. Active: True
14. Short description: Network Server Maintanance
15. Category: Network
16. Subcategory: DNS
17. Caller: ITIL User
185
Lesson-12
Business Rules
Agenda
Business Rules Overview
Advantages of Business rules
What are actions performed with Business Rules
Different Types of Business Rules
Business Rules Process Flow
How business rules will work
Scripting In Business
Practice with before and after business rules
Practice with aync and display business rules
Working with query business rule
Business rules excercises
Script Include Overview and Types of Script Includes
Working with ,g_scratchpad, getRefference().
Working with Glide Ajax
Business Rules Interview Questions
186
Business Rules Overview
1. Business rules are the server side script which means that it will
execute on server or database.
2. Business rules are the server side scripts logic that runs when record
is displayed, inserted, updated or deleted
3. We can use BR to complete tasks like update the values on a form
automatically when specific condition is met.
4. The table of BR is sys _script where all BR records are stored.
5. what all operations to be performed on database.
6. Create events for email notifications and script actions.
7. Business rule runs faster than other script in Service Now.
8. We can use business rules prevent unpredictable results and
avoiding performance issues.
187
What are actions performed with Business Rules
✓ Before
✓ After
✓ Async
✓ Display
188
Before Business Rule
✓ Code written in before business rule get executed when user submits
the form and data is not saved in database.
✓ Before Business Rules execute their logic before a database
operation occurs.
✓ Use before Business Rules when field values on a record need to be
modified before the database access occurs.
✓ Before Business Rules run before the database operation so no extra
operations are required.
✓ For example, concatenate two fields values and write the
concatenated values to the Description field.
189
After Business Rule
✓ Use to update information on related objects that need to be
displayed immediately,
✓ After Business rules are executed synchronously.
✓ After Business Rules execute their logic immediately after a database
operation occurs and before the resulting form is rendered for the
user.
✓ Use after Business Rules when no changes are needed to the record
being accessed in the database.
✓ For example, use an after Business Rule when updates need to be
made to a record related to the record accessed.
✓ If a record has child records use an after Business Rules to propagate
a change from the parent record to the children.
Aync business rules are used to update information on related objects that
do not need to be displayed immediately,
Use async Business Rules instead of after Business Rules whenever possible to
benefit from executing on the scheduler thread.
✓ Like after Business Rules, async Business Rules execute their logic after a
database operation occurs.
✓ Unlike after Business Rules, async Business Rules execute
asynchronously.
✓ Async Business Rules execute on a different processing thread than before
or after Business Rules.
✓ They are queued by a scheduler to be run as soon as possible.
✓ This allows the current transaction to complete without waiting for
the Business Rules execution to finish and prevents freezing a user's screen.
Use Async Business Rules when the logic can be executed in near real-time
as opposed to real-time (after Business Rules).
190
Display Business Rule
Use to provide client-side scripts access to server-side data.
display Business rule runs every time the form is displayed and the form
attempts to save due to current.update (). User might not have filled out
the form all the way and it is an annoying experience to the user.
✓ Display Business Rules execute their logic when a form loads and a
record is loaded from the database.
✓ They must complete execution before control of the form is given to a
user.
✓ The purpose of a display Business Rule is to populate an automatically
instantiated object, g_scratchpad.
✓ The g_scratchpad object is passed from the display Business Rule to
the client-side for use by client-side scripts.
✓ Recall that when scripting on the client-side, scripts only have access
to fields and field values for fields on the form and not all of the fields
from the database.
✓ Use the g_scratchpad object to pass data to the client-side without
modifying the form. The g_scratchpad object has no default properties.
191
Business Rule Process Flow
A table can have multiple Business Rules of different When types. The
order in which the Business Rules execute first
192
When business rules are running based on action
Action in which we mention action we want to take when BR I triggered
which can do via configuration or script.
This is the type of data base operation when both are met with the
condition mentioned in the BR. Then BR is triggered.
193
before and after guidelines mentioned above do not meet your
requirements
Procedure
1. Navigate to System Definition→Business Rules
2. Click on New
When to run:
7. Insert: True
8. Update: True
9. Category: Network
10. Subcategory: VPN
11. Click on Save
195
Action:
Set Field values: Assignment Group→To→Network
Add message: This ticket has been assigned to Network assignment group
196
Scripting in Business Rules
• We can also perform scripting in business rule for the functionality
which we are not able to achieve with just configuration.
• Business Rules scripts use the server-side APIs to take actions. Those
actions could be, but are not limited to
Basically we use the “Advanced” option and we can write server side script
in this script section ideally there is no spatial syntax for BR however they
are global variables which we can use to access of data records in our script.
Procedure
1. Navigate to System Definition→Business Rules
2. Click on New
197
3. Name : Auto assign to Group
4. Table : Incident
5. Advanced: True
6. Insert: True
7. Update: true
198
8. Condition: Category is Network
9. Click on Submit
199
Before Business Rules
200
Before Business Rules without Scripting
Exercise: 3
User should not be able to create new incident record, if category is
‘Inquiry/Help’ and assignment group is ‘Service Desk’.
Procedure
1. Navigate to System Definition→Business Rules
2. Click on New
201
3. Fill the business rule form
4. Name: User should not create Incident
5. Table: Incident
6. Active: True
When to Run
7. When: Before
8. Order: 300
9. Insert: Checked true
Filter Conditions
10. Category is Inquiry/Help
11. Assignment Group is Service Desk
Actions
12. Abort action: Checked True
202
Before Business Rule with Scripting
Exercise: 4
User should not be able to create new incident record, if there is an existing
incident with same Short Description, Category and Caller.
Procedure
1. Navigate to System Definition→Business Rules
2. Click on New
203
When to Run
8. When: Before
9. Order: 450
10. Insert: Checked true
Advanced
Exercise: 5
User should not change the Priority once created an incident ticket
204
3. Fill the business rule form
4. Name: User should not change the Priority once created an incident ticket
5. Table: Incident
6. Active: True
When to Run
7. When: Before
8. Order: 200
9. Update: true
Filter Conditions
10. Priority Changes
205
Actions
11. Add message: true
12. Message: User should not change the Priority once created an incident
ticket
13. Abort action: True
206
Exercise: 6
User should not delete incident ticket when incident state is NEW
Procedure
1. Navigate to System Definition→Business Rules
2. Click on New
When to Run
8. When: Before
9. Order: 350
10. Delete: true
Filter Conditions
11. State is New
207
Advanced
208
After Business Rules
Procedure
1. Navigate to System Definition→Business Rules
2. Click on New
209
3. Fill the business rule form
4. Name: Display info message
5. Table: Incident
6. Active: true
7. Advanced: True
When to Run
1. When: After
2. Order: 100
3. Insert: true
210
Actions
Message (‘New incident has been created by caller and incident number’)
Procedure
1. Navigate to System Definition→Business Rules
2. Click on New
211
3. Fill the business rule form
4. Name: Display info message and Caller and Incident Number
5. Table: Incident
6. Active: true
7. Advanced: True
212
When to Run
1. When: After
2. Order: 200
3. Insert: true
Advanced
Exercise: 9
Worknotes should be update when you are changed assignment group value
And display info message about assignment group updating
Procedure
1. Navigate to System Definition→Business Rules
2. Click on New
213
3. Fill the business rule form
4. Name: Worknotes should be update on assignment group change
5. Table: Incident
6. Active: true
7. Advanced: True
214
When to run
8. When: After
9. Update: True
10. Order:300
Filter Condition
Assignment Group Changes
Advanced
Exercise: 10
Condition
When incident state changes to On Hold and On Hold Reason is Awaiting
Change
Action:
215
Procedure
1. Navigate to System Definition→Business Rules
2. Click on New
216
When to run
8. When: After
9. Order: 100
10. Update: True
Filter Condition
Advanced
217
Exercise: 11
When we Closed problem ticket then automatically all related incidents should
get closed
Procedure
1. Navigate to System Definition→Business Rules
2. Click on New
218
When to run
8. When: After
9. Order: 250
10. Update: True
Filter Condition
11. Problem State Changes to Closed
Advanced
gr.state = 7;
gr.close_code = 'Solved (Work Around)';
gr.close_notes = 'Sucessfully fixed issue';
gr.setWorkflow(false); //don't want run other business rules
gr.update();
}
219
Exercise: 12
Incident task should be creating automatically an incident is created and
Caller, Category, Priority, Short Description, Description, State and work
notes fields should be copied to Incident task from incident.
Procedure
1. Navigate to System Definition→Business Rules
2. Click on New
220
3. Fill the business rule form
4. Name: Incident task should be creating automatically when new incident
is created
5. Table: Incident
6. Active: true
7. Advanced: True
221
When to run
1. When: After
2. Order: 350
3. Insert: True
Advanced
Advanced
222
Exercise: 13
Date validation, End date should be always greater than start date
Need to create 2 custom fields (Start Date and End Date) in Incident table
Procedure
1. Navigate to System Definition→Business Rules
2. Click on New
223
When to run
8. When: before
9. Order: 100
10. Insert: True
11. Update: True
Advanced
224
225
Async Business Rules
Note: We cannot use “changes (), changesTo (), and changesFrom ()”
methods in the scripting in Async Business Rules.
Note: Asynchronous business rules do not have access to the previous
version of a record.
226
Difference between After and Async Business Rules
After BR Async BR
After business rule is used when Whenever async business rule runs
some fields needs to be updated it create a scheduler for it in
and displayed to the user background and based on the
immediately after user saves the availability of the nodes in
record. Servicenow it will execute.
After business rules are used to Async business rule is required
update information on related when something is to be performed
objects that need to be displayed in Backend for updating some
immediately. other table data etc and user need
not know about that.
After the user submits the form Mostly used to trigger API call from
and after any action is taken on scoped app such as outbound
the record in the database. SOAP/REST
After Business Rules are executed Async Business Rules are executed
Synchronously Asynchronously
We can access Previous and We can’t access previous object
Current objects
User waits for response from and When the scheduler runs the
After Business Rules scheduled job created from the
business rule.
The system creates a scheduled
job from the business rule
227
Async Business Rule with Scripting:
We should create below objects to work with Async Business Rule
About Task
When we created new incident with category of network then immediately
send notification to assignment group
Working With
1. Event Registry
2. Notification
3. Business Rule
Exercise: 14
Procedure
1. Navigate to System Policy→Events→Registry
2. Click on New
228
4. Event Name: incident.critical.network
5. Table: Incident
6. Fired by: Business Rules
7. Description: When we created new incident with category of network
then immediately send notification to assignment group
8. Click on Submit
Procedure
1. Navigate to System Notification→Email→Notification
2. Click on New
229
Who will receive
10. Users: Provide your personal mail ID
11. Event parm 1 contains recipients: True
12. Exclude delegates: True
13. Send event creator: True
230
What it will contain
14. Subject: New incident has been created by Caller: ${caller_id} and
Category: ${category}
15. Message HTML: Caller:${caller_id}, Category:${category}
Procedure
1. Navigate to System Definition→Business Rules
2. Click on New
231
3. Fill the business rule form
4. Name: Critical incident with network
5. Table: Incident
6. Active: true
7. Advanced: True
When to run
8. When: async
9. Order: 100
10. Insert: True
232
Filter Conditions
11. Priority is 1-Critical
12. Category is Network
Advanced
gs.eventQueue('incident.critica.network',current,current.assignment_group);
233
Display Business Rules
Display business rules are used to get data from server to client through
callback function
1. The data is read from the database, display rules are executed, and the form
is presented to the user.
2. The current object is available and represents the record retrieved from the
database.
3. Any field changes are temporary since they are not yet submitted to the
database.
4. To the client, the form values appear to be the values from the database;
there is no indication that the values were modified from a display rule. This
is a similar concept to calculated fields.
5. The primary objective of display rules is to use a shared scratchpad
object, g_scratchpad, which is also sent to the client as part of the form.
6. This can be useful when you need to build client scripts that require server
data that is not typically part of the record being displayed.
7. In most cases, this would require a client script making a call back to the
server. If the data can be determined prior to the form being displayed, it is
more efficient to provide the data to the client on the initial load.
8. The form scratchpad object is an empty object by default, and used
only to store name:value pairs of data.
9. Storing field value for client.
10. Displaying message on the current form.
234
Display BR without Scripting:
Exercise: 15
Display an info message when user opens any incident record where
the assignment group and assigned to field are empty.
Procedure
1. Navigate to System Definition→Business Rules
2. Click on New
235
When to run
8. When: display
9. Order: 100
Filter Conditions
10. Assignment Group is empty
11. Assigned to is empty
236
Action
Add message: True
Message: Assignment group and Assigned to both are empty
Exercise: 16
Display alert message that current caller is VIP or not
Create New Business Rule
Step1: Need to create new business rule
Procedure
1. Navigate to System Definition→Business Rules
2. Click on New
237
When to run
8. When: display
9. Order: 200
Advanced
10. Condition: !current.isNewRecord()
11. g_scratchpad.is_vip = current.caller_id.vip;
239
13. Display Business Rule Result
Exercise: 17
Display current incident details like. Mail id, Priority and Category
Create New Business Rule
Step1: Need to create new business rule
Procedure
1. Navigate to System Definition→Business Rules
2. Click on New
240
When to run
8. When: display
9. Order: 300
Advanced
10. Script
g_scratchpad.mail = current.caller_id.email;
g_scratchpad.pri = current.priority.getDisplayValue();
g_scratchpad.cat = current.category;
241
Create New Client Script
Step 2: Need to create new client script
Procedure
1. Navigate to System Definition→Client Scripts
2. Click on New
3. Full fill client script form
4. Name: Display incident details
5. Table: Incident
6. UI Type: All
7. Type: OnLoad
8. Active: True
9. Global: True
10. Description: Display incident details
11. Script
function onLoad() {
242
Exercise: 18
Display count of associated incidents for particular problem
Create New Business Rule
Step1: Need to create new business rule
Procedure
1. Navigate to System Definition→Business Rules
2. Click on New
243
3. Fill the business rule form
4. Name: Display count of incident for Problem
5. Table: Incident
6. Active: true
7. Advanced: True
When to run
8. When: display
9. Order: 400
244
Advanced
10. Script
245
How many ways you will get data from Server to Client
1. We are going to getting the data from Server to Client very frequently
2. Basically we have 3 ways of getting data from server to client
g_scratchpad
getReference
GlideAjax
246
3. Fill the business rule form
4. Name: g_scratchpad variable example
5. Table: Incident
6. Active: true
7. Advanced: True
247
When to run
8. When: display
9. Order: 500
Filter Conditions
Priority is one of 1-Critical or 2-High
Advanced
g_scratchpad.cat = current.category;
248
function onLoad () {
alert ('Current record category is ' +
g_scratchpad.cat);
}
249
Working with getRefference
Exercise: 20
Display current record caller mail address
Procedure
1. Navigate to System Definition→Client Scripts
2. Click on New
3. Full fill client script form
4. Name: Display current caller email address
5. Table: Incident
6. UI Type: All
7. Type: OnLoad
8. Active: True
9. Global: True
10. Description: Display current caller email address
11. Script
function onLoad() {
var userEmail = g_form. getReference('caller_id', getMail);
}
function getMail(userEmail) {
g_form.addInfoMessage('Current caller email is ' +
userEmail.email);
}
250
Script Include
Script Includes are reusable server-side script logic that define a function
or class. Script Includes execute their script logic only when explicitly called
by other scripts. There are different types of Script Includes
1. On demand/classless
2. Extend an existing class
3. Define a new class
251
On Demand Script Include
✓ A Script Include that defines a single function is known as an on
demand, or classless, Script Include.
✓ The function is callable from other server-side scripts. On demand
Script Includes can never be used client-side even if the Client
callable option is selected.
✓ A script template is automatically inserted into the Script field.
✓ The template does not apply to on demand Script Includes. Delete
the template and replace it with your function definition.
✓ The Script Include function is defined using standard JavaScript
syntax. The example shows an on demand Script Include:
The Script Include name must exactly match the name of the function. In the
example, both the Script Include and the function are named sumTwoNums.
252
Although the sumTwoNums function is not defined in the Business Rule
script, the function exists because it is defined in the Script Include.
On demand Script Includes are typically used when script logic needs
to be reused. Examples include standardizing date formats,
enabling/disabling logging, and validating email addresses.
We should validate email address. The Script Include can be used by any any
application
Procedure
1. Add a string field (Requested for email) to the Incident table to
store an email address.
2. Use the Configure→Form Layout
253
3. Create new field
4. Click on Add and Save
254
Create New On Demand Script Include
Need to create new script include
Procedure
1. Navigate to System UI→Script Include
2. Click on New
3. Name: validateEmailAddress
4. API Name: global.validateEmailAddress
5. Accessible from: This application scope only
6. Active: True
7. Script
function validateEmailAddress(emailStr){
// Use JavaScript coercion to guarantee emailStr is a string
emailStr = emailStr + '';
// Compare emailStr against the allowed syntax as specified in the
regular expression
// If emailStr has allowed syntax, return true, else return false
if(emailStr.match(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|
(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-
9]+\.)+[a-zA-Z]{2,}))$/)){
return true;
}
else {
return false;
}
}
255
Use the Script Include in a Business Rule
Procedure
1. Navigate to System Definition→Business Rules
2. Click on New
256
3. Fill the business rule form
4. Name: Email Address Syntax Validation
5. Table: Incident
6. Active: true
7. Advanced: True
When to run
8. When: before
9. Order: 100
10. Insert: true
11. Update: true
Advanced
12. Script
257
Glide Ajax
The Glide Ajax class enables a client script to call server-side code in a
script include.
To use Glide Ajax in a client script, follow these general steps.
1. Create a Glide Ajax instance by calling the Glide Ajax constructor. As the
argument to the constructor, specify the name of the script include class
that contains the method you want to call.
2. Call the addParam method with the sysparm_name parameter and the
name of the script-include method you want to call.
3. (Optional) Call the addParam method one or more times to provide the
script-include code with other parameters it needs.
4. Execute the server-side code by calling getXML().
Note: getXML () is the preferred method for executing the code, because
it is asynchronous and does not hold up the execution of other client code.
258
Another method, getXMLWait(), is also available but is not recommended.
Using getXMLWait () ensures the order of execution, but can cause the
application to seem unresponsive, significantly degrading the user
experience of any application that uses it. getXMLWait () is not available
to scoped applications.
// the callback function for returning the result from the server-side code
function HelloWorldParse(response) {
var answer =
response.responseXML.documentElement.getAttribute("answer");
alert(answer);
}
Extending GlideAjax
The GlideAjax class is used by client-side scripts to send data to and receive
data from the ServiceNow server. The client-side script passes parameters
to the Script Include. The Script Include returns data as XML or
a JSON object. The client-side script parses data from the response and can
use the data in subsequent script logic.
259
The incident form has a reference field called Requested for.
The Requested for field references a record on the User [sys_user] table.
The User table has a column called Email, which stores a User's email
address.
Recall that client-side scripts have access only to data from the fields on
a form. Although the incident form has a field that references
the User table, it does not have access to the Requested for's email
address which is stored in the database. This example will extend
the GlideAjax class. The new class will be passed a sys_id for
the User table and will retrieve and pass back the user's email address.
260
scope: global.AbstractAjaxProcessor. The new class defines a method
called getEmail.
Excercixe:21
We should write a Script Include to create a client-callable Script Include by
extending GlideAjax. The new Script Include retrieves the Requested
for's email address from the User table.
Procedure
1. Add two more fields (Requested for) and (Requested for email) to
the Incident table to get an email address.
2. Use the Configure→Form Layout
261
5. Crate one more string field (Requested for email)
263
9. Global: True
10. Description: Use the GetEmail Address Script Include to retrieve the
Requested for email address from the database when the Requested for
value changes.
11. Script
g_form.setValue('u_requested_for_email',emailFromScriptInclude);
264
g_form.setDisabled('u_requested_for_email', true);
}
}
12. Script
265
use of an out-of-scope file (AbstractAjaxProcessor). You will see the
message only once.
5. Change the value in the Requested for field to Beth Anglin. The value in
the Requested for email field should change again and display Beth
Anglin.
1. GlideSystem (gs)
2. GlideUser (g_user)
3. GlideDateTime
4. GlideDate
5. GlideForm (g_form)
268
ANSWER: Responses 1, 3, and 4 are correct. GlideSystem, GlideDateTime,
and GlideDate are part of the ServiceNow server-side API. The server-side
API also has a GlideUser class but the server-side GlideUser class does not
use the g_user object. If you are not sure whether a class is part of the
client-side or server-side API, check the API Reference.
QUESTION:2
Which one of the following describes when before Business Rules
execute their script logic?
ANSWER: onBefore Business Rules execute their script logic before records
are updated in the database.
QUESTION:3
What is the difference between an after Business Rule and an async
Business Rule?
ANSWER: Both after and async Business Rules execute their script logic after
records are written to the database. after Business Rules execute their
logic immediately after a record is written to the database. async Business
Rules create scheduled jobs that run soon after a record is written to the
database.
QUESTION:4
Which of the following are NOT methods from the GlideRecord API? More
than one response may be correct.
1. addQuery ()
2. addEncodedQuery()
3. addOrQuery()
4. addAndQuery()
5. query()
269
statements that use the addQuery () method the queries are ANDed. To
explicitly AND or OR a condition in a query, use the methods from
the GlideQueryCondition class.
QUESTION:5
Which of the following are NOT true about the current object? More than
one response may be correct.
1. true
2. false
3. Nothing
4. ""
5. NULL
270
ANSWER: Response 1 is correct. If there is no value in the Condition field,
the field returns true. Business Rule scripts only execute their script logic
if the Condition field returns true.
QUESTION:7
Examine the database tables and fields.
1. u_requested_for.userID
2. current.u_requested_for.userID
3. number.userID
4. current.number.userID
5. previous.email.u_requested_for
object.related_object.field_name
QUESTION:8
Which of the following are true about Script Includes? More than one
response may be correct.
Client Scripts
UI Policy
UI Scripts
Catalog Client Script
Catalog UI Policy
Widget client script
UI Pages - Client script
272
Server Side Component
Business rule
Script include
Script action
Schedule job
Fix Scripts
Workflow run script
Email Scripts
Installation Exits
Widget server side script
ACL Script
Transform map scripts
Field map scripts
UI Actions
UI Pages - Processing script
UI Macros
Lesson-13
Flow Designer 273
Agenda
1. Flow Designer Overview
2. Workflow Engine VS. Flow Designer
3. Archetecture of Flow Designer
4. Sequence of Flow Process
5. Process Flow Excecution Diagram
6. Different States In flow designer
7. Flow designer Features and
Advantages
8. What is Flow?
9. Triggers and Types of Triggers
10.Action Flow and Actio flow Order
11.Practice with more examples
12.Working with Integration HUB
274
Flow Designer provide us rich capabilities for automating processes to
reduce repetitive tasks, allowing us to focus on high-value work .and record
operations without writing a single line of code.
Service now platform expand Flow Designer with Integration Hub to
integrate third party applications or services for more comprehensive
workflows and automation across your enterprise.
Now, anyone can build flows to deliver business solutions faster.
Out-of-the-box core actions and Service Now spokes (scoped applications
with Flow Designer content) accelerate flow creation.
Vs.
Flow Designer enables users to use natural language to automate tasks,
record operations, notifications, and approvals without having to write it in
code. It enables various process automation capabilities in a consolidated
design environment. Flow Designer lets you build multi-step processes simply
by dragging, dropping, and connecting steps.
If you are a beginner or not technical enough to build out processes in code,
Flow Designer is going to be your jam. 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 are going to find Flow
Designer a lot easier to use.
275
Trigger can define when to start our flow, which can be record based,
schedule based, or application based
Record-based triggers run a flow after a record has been created, updated,
or deleted. The flow can use the triggering record as input for actions.
Schedule-based triggers run a flow at the specified date and time. The flow
can use the execution time as input for actions.
276
Different states in Flow Designer
277
Flow designer application providing great futures with in application
• Natural Language platform
• Less coding
• Handle complexity data
• Non-technical person also understands and work on it
• Create actions and reusable
• Allowing to call script include code snippets
• Schedule jobs for automate business process
• Included Integration Hub
• Connecting third party application
• Spokes feasibility
• Decouple business policy from processes
• Out-of-the-box flow triggers and action
• Reusability action
• Reduce development costs by providing a library of reusable
flow components created by service now developer
• Natural language is used to assist no-code users configure flow
components without having to know how to script,
• Process owners and developers can create, operate, and
troubleshoot flows from a single interface
What is Flow?
Flow is sequence of actions for automate business process in servicenow
platform A flow contains triggers and one or actions
278
What is trigger?
The trigger defines the conditions that when start the flow. When
our trigger condition is true, the system will start the flow.
Flow designer application can support three types
of triggers.
1. Record Based
2. Schedule Based
3. Application based
Record Triggers
Record triggers will be occurring when record was created or updated.
Record Triggers
Created Updated Created or Updated
Date triggers
Date triggers are used to start a flow after a specific date and time or
repeatedly at scheduled intervals, depend on scheduled you selected
Because flows are processed asynchronously, a flow with a date trigger may
not run at the exact scheduled time its trigger conditions were met. For
example, if a scheduled flow is triggered during core business hours, the
system may have to process other events in the queue before it can run the
scheduled flow.
Date Triggers
Daily Starts a flow at a specific time every day.
280
Monthly Starts a flow at a specific time every month.
Application triggers
Use application triggers to start a flow when application-specific conditions
are met.
Application Triggers
SLA Task Starts a flow when a MetricBase trigger is met.
Requires the MetricBase application.
Metric Base Starts a flow from a Service Catalog item request
281
Flow Designer User Workspace and components
Flow designer user interface is used to create a new flow and
managing or modified existing flows
282
What is Action in Flow?
Actions define the work performed by a flow. Now platform
included so many system actions
Flow Actions
▪ Create Record ▪ Copy Attachment
▪ Update Record ▪ Delete Attachment
▪ Delete Record ▪ Lookup Attachment
▪ Create task ▪ Move Attachment
▪ Lookup Record ▪ Create Attachment
▪ Log ▪ Get Catalog Variable
▪ Send Email ▪ Ask for Approval
▪ Create Catalog Task ▪ Create or Update
▪ Wait For Condition
If you want, add an action to existing flow, click the Select to add
an Action, Flow Logic, or Subflow link.
283
Click on Action button to add an action
284
Every action has a different set of configuration fields. The configuration
fields are dependent upon what the action does.
For example, the Delete Record action needs to know the Table in which
to create the record and the field values for that record.
To add an action between actions in the flow, hover over the transition line
between the actions and click the Add Action, Flow Logic, or
Subflow button. The tooltip indicates where the action will be added.
285
NOTE: The Add Action, Flow Logic, or Subflow button is only visible when
hovering over the transition line.
Flow Designer is the user interface used to create new flow and modified
existing flow and manage all aspects of flows. Users with a Flow Designer
role or the admin role can work with flows. Flow Designer roles are
• First, we can view the flow's trigger and actions, which are Allready
configured
• Then we can execute the flow for better understand how it is working.
• Finally, we will see the results of the flow.
286
Requirement
In this practice exercise, we will see the Visual Task Boards (VTB) currently
owned by Beth Anglin. We will see an Incident assigned to Beth Anglin.
When a critical (Priority 1) Incident is created, the VTB Sample Flow creates
a Freeform Visual Task Board (VTB) and creates a card for the Incident in
the to Do lane.
Procedure
1. Navigate to Flow Designer application
2. Click on Designer module
287
4. Identify the trigger. The flow triggers when an Incident record is
created. What other conditions need to be met?
5. Checking the actions. How many actions does this flow have?
6. Review each action. What do the actions do?
288
Execute VTB Sample Flow
1. Impersonate with Fred Luddy
2. Check Fred Luddy Visual Task Board, it is empty
289
5. Set the created Incident Record field to INC0010011.
6. Click the Run Test button.
7. When the flow has been executed, click the Close ( ) button to
close the Test Flow dialog.
290
Check Results of VTB Sample Flow
Let see results how the VTB sample flow added Visual T Board to Fred luddy
1. Impersonate with Fred Luddy
4. The Look Up action in the VTB Sample Flow finds the to Do lane in the
new VTB and adds the Incident to the to Do lane.
291
Exercise-2: Critical-1 Incident Flow
Requirement:
When customer created Priority-1 incident (Flow Will Start)
Trigger Condition
Incident Created where (priority is 1-Critical, and active is true
Actions
1. If Incidents short description value contain ‘Issue with networking’ (If
Condition
2. Auto assign the value to assignment group is Network and
Incident Caller Manger add as a Watch List (Update Incident Record)
3. Add one work note link to context( To see execution details)
4. Send Email to Caller about incident creation
Procedure
1. Navigate to Flow designer→Designer
2. Click on Designer
292
3. Click on Flow (To create New Flow)
4. Fill all required details for flow record
293
9. Click on + to add Trigger Condition
294
15. After created trigger condition it will show look like below
screen shot
295
Create Actions
Procedure
1. Open your Priority-1 Incident Flow
2. Click on Action + icon
3. Click on Flow Logic button
4. Select If statement
5. Fill the If condition record (Check condition to If Evaluted true
then perform next operation)
296
9. Use Data pill to fill condition 1
297
12. Fill action form
298
18. Add work note link to context
19. Click on + Icon
20. Create new action
299
22. Action : Add work note link to context
23. Table: Incident
24. Record: Trigger→Incident Record
25. Journal Field: Work notes
26. Additional Comment: New P1 Incident created by:
Trigger→Incident Record→Caller→Name
27. Click on Done
300
31. Fill Send Email action Form
301
32. Action: Send Email
33. Target Record: Trigger→Incident Record
34. Include Watermark: Checked
35. Table: Incident
36. To: Trigger→Incident Record→Caller→Email
37. CC: Trigger→Incident Record→Caller→Manager→Email
38. Subject: New P1 Incident cretaed by behalf of you
Trigger➛Incident Record➛Caller➛Name
39. Body
302
44. Fill Group Users to Task Conversation action Form
45. Action: Group Users to Task Conversation
46. Task Record[Task]:Trigger→Incident
47. Group→ Trigger→Incident→Assignment Group
303
Test Your Flow
1. Navigate to→Flow Designer
2. Click on Designer Module
304
5. After open your flow click on Activate button (activate your flow)
305
8. Click + and Create New Incident
9. Fill all required details
11. Select your test record and click on Run Test button
306
12. Click on Execution Details link to see execution history of your
flow
307
Exercise-3:
Incident state changes to on-hold and hold reason is
awaiting change then the the will start
Requirement
When Incident record state update with on-hold and on hold
reason is awaiting change then this flow will start
Trigger Condition
Incident updated where (state change to 3, and on hold reason is
Awaiting Change)
Actions
1. Ask for Approval
CAB Department need to approve for create new change
2. If CAB Person Approved then
At least 2 members need to approved
3. Create a change request record with following fields
• Configuration Item
• State
• Short Description
• Assignment Group
• Assigned To
• Category
308
4. Update Incident Record with below fields
• State is closed
• Work notes
• Resolution Code
• Resolution Note
5. Log Action
Store a log file into system for better understand
6. Send Email
• To: Incident Record Assigned group mail
• CC: Incident record assigned to
• Subject: New change record was created for this incident
• Body: When CAB manager approved, Change request will be
created automatically
7. Slack Post Message
• Web hook URL:
https://hooks.slack.com/services/T012W8WQ718/B0138
UAMY5P/6qTq2AGvhpXZ7mFUdUGW2zSm
• Message :Defined your message
• Username : Servicenow
309
1. Create Trigger Condition
2. Click on + Select add to a Trigger
3. Click on Done
310
5. Click on Done
6. Add Flow Logic
311
7. Click on Done
8. Add action Create Record
9. Click on Done
10. Add Update Record Action
312
11. Click on Done
12. Add Log Action
313
15. Click on Done
16. Add Post Message action from Slack spoke (Internal
Communicator)
314
17. Click on Done
315
316
Exercise-4: Create a flow with service catalog item
If you want work with service catalog item flow process, need to activate
the Flow Designer support for the Service Catalog plugin
(com.glideapp.servicecatalog.flow_designer). This plugin activates related
plugins if they are not already active.
Requirement
When customer requested for add a role to user through Service
Catalog item Then this this flow will start
Trigger Condition
Select Service Catalog trigger
Actions
1. Get catalog variables
Get catalog variables from catalog item template
2. Ask for Approval
Ask approval for requester manager
3. If Condition
If manger approved the request (Move to next activity)
4. Create User role record
Create user role record in [sys_user_has_role] table
5. Else Condition
If manager rejected the request, then rejected and create log
information about reject reason
Procedure
1. Create a catalog item to run our flow
2. Navigate to Service Catalog →Catalog Definition→Maintain Item
3. Click on New
4. Fill Catalog Item form
317
6. Save the record
7. Click on Submit
8. Add Trigger Condition
318
9. Click on Done
10. Add more actions to our flow
11. Add Get Catalog Variables to get catalog item variables
319
14. Click on Done
15. Add If Flow Logic
320
18. Click on Done
19. Add Else Condition Flow Logic
321
Add this Flow to our Catalog Item
22. Navigate to Service Catalog→ Catalog Definition→ Maintain
Item
23. Open Request a role for user Catalog Item
24. Go to Process Engine Tab
25. Add our flow
322
26. Save catalog Item record
27. Click on Try it button in the same item
28. Fill the two variables and Click on Order Now Button
323
5. Click on Executions
6. Check our Flow Execution
7. It is showing waiting for manager approval
324
Interview Questions
Ans: Flow
325
12. Created every time an action is added to a flow and stores
variables the action generates
Ans: If
22. Optional conditional statement to execute actions when an if
statement is false
Ans: Else if/Else
23. Flow logic that executes actions within this statement on every
record in the list
326
Ans: For Each
24. Repeatedly apply one or more actions until the condition is
meet
Ans: action_designer
32. Reusable operation that enable process analysts to automate
Now Platform features
Ans: Action
33. A container for any combination of actions, Flow Logic, and
Subflows
327
Ans: Core Action
36. Provides a way to create functionality that is not available in
the base instance
Ans: Spokes
39. A single reusable operation in the Action Designer that carries
out the work
328
44. Name 3 Trigger Types
Ans: Record based, Schedule-Based, Application
45. What are subflow inputs responsible for
Ans: They specify the data available to the subflow when it launches
46. When a flow is processed the system stores the execution
details in a record in the Log[syslog]table
Ans: False
47. Name 2 roles grant full access to all flow designer features in every
application scope
Ans
• Scoped helps categorize content and makes it easier to maintain and
release
• Scope protects an application and its artifacts from damage to, or
from other application
51. Name of the run trigger option that must be selected for the
flow to execute every time the trigger condition is meet
329
53. Name 3 benefits of the Flow Designer
Ans:
• Reduce development costs by providing a library of reusable flow
components created by service now developer
• Natural language is used to assist no-code users configure flow
components without having to know how to script,
• Process owners and developers can create, operate, and troubleshoot
flows from a single interface
Ans:
• Contains input and output that pass data to and from the subflow.
• Sequences reusable actions that can be started from a flow, a
subflow, or a script
330
60. What is main purpose of flow logic
Ans: They can set a protection policy as well specify the runs as setting
331
Lesson-14
Knowledge Management Life
Cycle and Sate Model
Agenda
Knowledge Management Overviev
Available Roles in Knowledge Management
Knowledge Management Usage and Benefits
Knowledge Management Architecture
Knowledge Mnagement Life Cycle and State Model
Describe key knowledge management personas
Workflow of a Knowledge Articles
Knowledge Management Properties and Features
Knowledge Management Article Versioning
Describe the article quality index and how to execute the check list
Have an understanding of the available management
dashboards, reports, home pages in service now platform
Use of Knowledge article template
332
Knowledge Management Overview
Knowledge management is an application with in service now platform.
The service now knowledge management application is used to sharing of
information as knowledge base. These all knowledge basses may contain
number of knowledge articles. This application will support the process of
Knowledge management and sharing the documents in our business unit.
333
Knowledge Management Roles
KM Roles
Knowledge Access Knowledge Application
menu and Articles
knowledge_manager Knowledge managers perform
administrative functions for
knowledge bases they manage
such as defining categories, pinning
important articles,
knowledge_admin Knowledge administrators can
create new knowledge bases and
manage all KB
admin Service now Administrators can
configure knowledge workflows,
set knowledge properties, and
manage knowledge forms and
homepages.
KM Coach Review Link Quality, Performs AQI
Surveys, Leverages AQI Coach
knowledge team
335
Knowledge Management Life Cycle
Review
(2)
Draft1 Publish
(1) (3)
Retire
(4)
336
KM Workflow Stages
Draft Knowledge base contributors create
draft knowledge articles
independently (or from existing task
records with the Knowledge
Advanced plugin*)
Review Subject Matter Experts (SMEs)
and/or knowledge managers review
the knowledge article for content
accuracy and formatting
consistency.
Publish Once the knowledge article is
reviewed and approved, the article
is published to the knowledge base.
Retire The knowledge manager may retire
the article once it reaches its valid-
to date, or re-engage with SMEs to
publish a new version.
337
Scope and Requirements
To get started with Knowledge Management, your organization must
define the knowledge scope and requirements. Consider the following:
1. What are the objectives of your organization? Think about both quick
wins and long term goals.
2. Identify your knowledge consumer groups. These groups will define the
requirements for the User Criteria records in Service Now. Examples
include:
• External Customers
• Internal End Users
• Service Desk Members
• HR Employees
• Users within a specific region
339
2. Click on New Button
340
4. Provide unique name of the knowledge base (HR Knowledge Base)
5. Publish Workflow: Knowledge-Instant Publish
6. Retire Workflow: Knowledge-Instant Retire
7. Click on Submit
341
8. New knowledge Base was created successfully
Note: Once the knowledge base is created and saved, additional configurations
can be set for the knowledge base.
Procedure
1. Navigate to HR Knowledge Base→Knowledge Categories
2. Click on New
342
3. Label: Payroll
4. Value: Payroll
5. Click on Submit
343
6. Create one more Knowledge Base Category(On-Boarding)
344
Exercise 3: Create New Knowledge Article
The list of knowledge articles stored in this knowledge base. New
knowledge articles can be created from knowledge tab
Procedure
1. Navigate to HR Knowledge Base→Knowledge
2. Click on New
345
4. Knowledge base: HR Knowledge Base
5. Category: On-Boarding
6. Valid to :2022-02-18
7. Article type: Wiki
8. Wikitext: Post some content into your article
9. Click on Submit
10. Publish your Knowledge Article
11. Click on Publish
346
Exercise 4: Publish Knowledge Article
When we created a knowledge article the by default state is Draft
Procedure
1. Click on Publish button to to publish your article (with out approval)
2. Publish workflow got select (Instant Publish) for this knowledge base
347
Exercise 5: Retire Knowledge Article
We can retire the latest published knowledge article. Retiring a knowledge
article does not create a new version. It simply marks the article as Retired.
Procedure
1. Navigate to HR Knowledge base→On-Boarding→Employee On-Borating
2. Knowledge article will be retire depends on Valid to or
3. Retire your knowledge article forcefully
4. Click on Retire Button
5. Article will be retired (without approval) Instant Retired
Note: Once Knowledge article is retired, the article is not visible any
customers until to republish it
348
User Criteria
We specify user criteria for a knowledge base to restrict which users are
granted access to read and contribute knowledge articles to that knowledge
base.
You can assign user criteria to control read or contribute access. For example,
you could enable all users in your Support department to have contribute
access to a knowledge base by creating a user criteria record with the required
department set to Support, and then including the user criteria record in the
Can Contribute user criteria.
Let’s start create a new user criterion for our knowledge base
Visible to only HR Department people and company is ACME China
Procedure
1. Navigate to Knowledge→Administration→User Criteria
2. Click on New Criteria Record
349
3. Fill user criteria form
350
Related List Description
Can Read Users can read knowledge
articles in the knowledge base.
Cannot Read Users can't read knowledge
articles in the knowledge base.
Can Contribute Users can create, modify, and
retire knowledge articles in a
knowledge base. Contribute
access to a knowledge base also
provides read access to all
articles in the knowledge base.
Cannot Contribute Users can't create, modify,
retire, or read knowledge
articles in the knowledge base
351
Knowledge –Centered Service (KCS)
KCS strongly supports and enables the Solve & Evolve Loop through reward
learning (a positive reinforcement methodology), collaboration, sharing and
improving knowledge by enabling both agents and end users to interact with
knowledge by flagging, fixing, updating, and creating new knowledge.
The Solve Loop includes resolution activities that work to capture and re-use
resolution steps. The Evolve Loop focuses on assessment and improvement
activities. Together the Solve & Evolve Loops create a self-correcting system
that is co-dependent of one another.
Throughout this course we will discuss ways to implement KCS principles in
Service Now. While not every organization will be mature enough in their
Knowledge Management journey to implement all parts of KCS right away,
there will be pieces that can and should be leveraged at any point of maturity.
352
Leveraging Knowledge Management in Service Now will:
The Publish workflow will move a knowledge article between the Draft and
Publish stages. It defines what, if any, approvals are required to move stages.
It will also define if any notifications are required, and who they are sent to.
By default, there are two publish workflows available for knowledge:
353
Retiring a knowledge article
The Retire workflow will move a knowledge article between the Publish and
Retire stages. It defines what, if any, approvals are required to move stages. It
will also define if any notifications are required, and who they are sent to.
By default, there are two retire workflows available for knowledge:
354
Thank You
355