ServiceNow
Self-Learning Exercise Guide
Activity Log:
Doc Update Last
Email Comments
Version d By Updated
Basheerahmed.Mohammed@team.telstra.co Initial Draft version
Ver 1.0 Basheer 7/12/2018
m
Ver 1.1 Arafat 7/14/2018 Arafathussaintauseef.shaik@team.telstra.com Review comments suggested.
Basheerahmed.Mohammed@team.telstra.co Review comments incorporated,
Ver 2.0 Basheer 7/17/2018 designing the course conceptually.
m
Ver 2.1 Arafat 7/18/2018 Arafathussaintauseef.shaik@team.telstra.com Review comments suggested.
Basheerahmed.Mohammed@team.telstra.co Review comments incorporated & added
Ver 3.0.0 Basheer 7/28/2018 Advance ServiceNow Concepts
m
Telstra Confidential 2018 - All rights reserved.
Exercise 1: Application Menu
1.1: Menu
Create three different Application Menu as per below information:
Employee
Asset
Issue
Exercise 2: Data Model
2.1: Table
Create three new tables as per below information and add few columns to the existing INC
table.
Employee (New)
o Uncheck ACLs, Roles.
o Make it Extensible.
Asset Information (New)
o Uncheck ACLs, Roles.
Issue
o Uncheck ACLs, Roles.
Incident (Add few additional fields)
1. Employee: Place the module in Employee Application.
Column
Label Name Type Reference Dependent Choice
Auto Number
Employee Id u_number (Integer)
Preferred Name String
First Name String
Last Name String
Mobile Phone Number
Full Name String
WholeSale,
Unit Choice Retail
Distribution(w),
Sales(w),
Licence(w),
Software(r),
Advertisement
Sub Unit Choice On Unit (r)
Telstra Confidential 2018 - All rights reserved.
Mail Id Email
Asset
Assets Glide List Information
Blood Group Choice 4 Blood Groups
DOB Date
Type of Permanent,
Employment u_type Choice Contract,
Gender Choice Male, Female
2. Asset Information: Place the module in Asset Application.
Column
Label Name Type Reference Dependent Choice
Allocated Till Date/Time
Allocated To Reference Employee
Allocated From Date/Time
Contractual
,
Temporary,
Team,
Permanent,
Weekday,
Weekend,
Not
Allocation Type Choice Allocated.
Laptop,
Mobile,
Asset Type Choice Data Card
Dell(L),
Sony(L),
Sony(M),
Apple(L),
Apple(M),
MI(M),
MI(L),
Telstra(D),
Manufacture Choice Asset Type Idea(D)
Mobile Number Phone Number
Asset ID u_number Auto Number
Telstra Confidential 2018 - All rights reserved.
3. Issue: Place the module in Issue Application
Column
Label Name Type Reference Dependent Choice
Number Auto Number
Caller Reference Employee
Raised For Reference Employee
New, In-
Progress,
Closed,
Status Choice Escalate
Comments Journal Entry
Contact Phone Number
Mail Email
General
Enquiry,
Technical
Enquiry,
Closure Reason Choice Escalated
Agent Reference User ME
Transferred To Reference Incident
Asset Reference Asset
4. Add few Columns to the Incident Table
Label Column Name Type Reference Dependent
Asset Reference Asset Information
Raised For Reference Employee
Change the
reference from
Caller Do not Create Reference Employee User to Employee
Mobile Phone Number
Mail Email
2.2: Relationship
Create relationships on the Employee table which can show number of incidents raised
by the employee as caller.
Create relationships on the Employee table which can show number of incidents raised
by the employee as Raised For.
Create relationship on the Asset Information table which can show number of incidents
raised for the asset.
Telstra Confidential 2018 - All rights reserved.
Create relationship on the Issue table which can show number of incident raised for
Caller, Raised For and the number of incidents raised for the Asset Information.
Exercise 3: Forms and UI
3.1: Forms
Adjust the Form’s by using the Form Layout and Form Designer
3.2: Form View
Create custom View in Employee, Asset Information and Incident with at least 5 random fields.
3.3: List Layout and List Control
Create List Layout for the lists of Employee and Asset Information table.
Create a List Control to remove the new button for the Employee table and after testing the
functionality replace with the same.
3.4: Related List
Create Related according to the relationships for the tables by relating the amount of incidents
raised by an employee and the amount of incidents raised for an asset
Exercise 4: Navigation
4.1: Modules
Create 3 modules for Employee Table.
1. Employees List of Records of Employees
2. Permanent Employees List of Records of Permanent Employees
3. Create Employee New Record
Observe different types of links being provided under modules section.
Exercise 5: Server Development
5.1: Business Rule
5.1.1: Before Business Rule
The full name should be the combination of the firstname, middlename and lastname.
If preferred name is not entered during the submission of the form, populate it as the
firstname.
Telstra Confidential 2018 - All rights reserved.
5.1.2: After Business Rule
If Allocated To is populated for the first time/Change in its value then, Allocate From
should be today’s date and time and Allocated Till should be 1 year(1 year should be
configurable – use system property) from today in the Asset Information record.
Note:
The above functionality is best achieved in the form of a Before Business rule
as there is an update operation involved on the same table. Why is it said to
do an After Business rule is to check the functionality of the code going in loop
if tried to update the same table’s record.
Add code .update() in the before business rule and in the After Business rule. If
tested properly we can observe that the functionality is in loop.
Do not use .update() when updating the record of the same table. If it is an
another table record getting updated, then we can use .update() functionality.
5.1.3: Async Business Rule
Give a leisure time to the system to allocate the time and raise an issue as soon as the
Allocate To is populated for the first time/Change in its value.
When a p1 priority incident is created – create a Problem record copying description , short
description , caller and associate incident to the problem record .
Whenever a new comment is added n RITM form it should be copied to all child catalog task
5.1.4: Display Business Rule
5.2: UI Actions
Create a UI action named Resolve on the Incident form.
On click of resolve, the incident should get resolved.
Call an event (Creation of event is below) to do the resolve functionality of the incident
Create a UI action named Escalate on the Issue form. This button should be visible only
when the Status of the Issue is Escalate and on click of this button the closure reason
should be Escalated and it should redirect to a new incident form and the Transferred to
field should be populated with the incident number.
Remove Update button when the State of the issue is Escalate and populate an Escalate
button as mentioned above.
Remove Delete button from the issue.
5.3: Event Registry
Create an event
Telstra Confidential 2018 - All rights reserved.
5.4: Script Action
Create a Script action which can be used for an event, which is getting called from the event. In
the script field do write and test the functionality.
5.5: Script Include
Create 2 Script Include. One should be a Client Callable Script and the other should be a
Non-Client Callable script.
Exercise 6: Client Development
6.1: Client Scripts
DOB should not be a future date. Alert the User saying “Date of Birth cannot be future
date”
Resolved Date should not be a future date and it should be before the date of creation
of the incident.
Alert the user saying:
1. Resolved Date cannot be Future Date If user enters future date
2. Resolved Date cannot be before Date of Creation If user enters date before the
creation of the incident.
Restrict the change of Cell Edit for Allocation Type field. Alert the user not to change the
date.
6.2: UI Policies
6.2.1: UI Messages:
Implement UI messages by following below notes:
Create two UI Messages
Key: Permanent, Value: Permanent
Key: Contract, Value: Contract
6.2.2: UI Policies
Implement UI Policies on Employee table by following below notes:
Adjust Mobile and make it Mandatory on the form of the Employee.
Make First Name Mandatory on the Employee form.
6.2.3: UI Policy Actions
Implement UI Policies on Asset Information table by following below notes:
The Type, Allocated From and Allocated Till fields should be Read Only.
Show the Message as Permanent and Contractor below the Allocated To field. Below is
the image. Use the UI Messages created above to show the message below the field.
Telstra Confidential 2018 - All rights reserved.
Make Mobile Number Visible and Mandatory only if the Asset Type is selected as
Mobile.
Make Closure Reason Read-only when the State is selected as Escalate.
6.3: UI page
A. On click of resolve, the incident should get a pop through UI page saying “Are you sure
to resolve this incident” with Yes and No buttons on the UI page.
B. On Click of yes the incident should get resolved. The fields related to Resolved should
also get populated. If no, nothing action to be done other than direction to the from.
Exercise 7: Server Call through Different Scripts
7.1: Client side to Script Include
The field Allocation Type should be populated based on the field Asset Allocated To.
Below is the logic which needs to be implemented.
Employment Type Unit Sub Unit Asset Allocation Type
Contract Anything Anything Contractual
Permanent WholeSale Distribution Temporary
WholeSale Sales Permanent
WholeSale Licence Weekend
Retail Software Team
Retail Advertisement Weekday
If Empty Or Empty Or Empty Not Allocated
Telstra Confidential 2018 - All rights reserved.
7.2: Server side to Script Include
Mobile, Mail and Desk should be auto-populate based on Raised For field, on Submit of
the Form for incident – Write the code in business rule. This can also be achieved
through Client Scripts.
Remove the script from the above written business rule and call the Script include from there
and write and test the functionality.
Remove the script from the Script Action and call the Script include and write and test the
functionality.
Exercise 8: Scheduled Jobs
Create a Schedule job with periodic action to inactivate the records from the User
table, if the last login time is more than 1 month.
Exercise 9: Report
Create multiple bar graphs which can show the report on incident based on the
priority, Impact, Assignment Group and Status.
Create a Schedule Report for the number of active users in the system and mail to
yourself.
Exercise 10: Inbound Integrations:
10.1: Import Set and Transform Map
Load the data though the CSV and XLS formats into the Tables of Employee and Assets.
10.2: Data Sources
Exercise 11: Scripted REST API and REST Messages
Create a Scripted REST API to sync the Employee records in 2 instances (Get one more
instance and create the above mentioned table in the above exercise)
Both should have the GET, POST, PUT methods and both the systems should be able to
communicate with the data which can be interchangeable
Take few fields from Employee table and hit different types of calls and do the data
manipulations.
Use JSON format and understand the concepts of Object Writer and Stream Writer in
the Script.
To test the data we can also use POST-MAN(Try to install and learn how to hit the
instance)
Telstra Confidential 2018 - All rights reserved.
Exercise 12: Record Producer
12.1: Create a Record Producer
Name: Report Incident
Table: Incident
12.2: Variables
1. Caller: Map to caller in Incident: Single Line Text
2. Incident Being Raised For: Map to u_raised_for in Incident : Single Line Text
3. Report Incident: Macro: Create a Macro Record and give some HTML code
A. Remove the submit button from the Record Producer From
B. Make the fields Caller, Issue Being Raised for Mandatory
C. Make the Report Incident visible only after the field Incident Being Raised for is
populated with some value
D. Validate the Issue Being Raised for, if conditions are not met then show an alert
1. It should start with EMP
2. It should contain only 7 letters
E. As soon as we click on Report Incident, it should redirect to Incident form with the
below mappings
1. Caller of Record Producer Caller of Issue form
2. Incident Being Raised For of Record Producer Raised For of Issue form
The Assets field in the Incident form should be auto populated with the assets of the
Raised For field in the Incident form. Get the Assets from the Asset Information form.
Do create a module to show it in the
12.2: Create a Record Producer
Name: Report Issue
Table: Issue
12.2: Variables
4. Caller: Map to caller in Incident: Single Line Text
5. Issue Being Raised For: Map to u_raised_for in Incident : Single Line Text
6. Report Issue: Macro: Create a Macro Record and give some HTML code
A. Remove the submit button from the Record Producer From
B. Make the fields Caller, Issue Being Raised for Mandatory
C. Make the Report Issue visible only after the field Issue Being Raised for is
populated with some value
D. Validate the Issue Being Raised for, if conditions are not met then show an alert
3. It should start with EMP
Telstra Confidential 2018 - All rights reserved.
4. It should contain only 7 letters
E. As soon as we click on Report issue, it should redirect to Issue form with the below
mappings
3. Caller of Record Producer Caller of Issue form
4. Issue Being Raised For of Record Producer Raised For of Issue form
Exercise 13: Team Dashboard
Register for one more instance and make it as parent to the current instance by configuring
through Team Dashboard.
Move all the updates from the child to parent and observe the push concept.
Do some code changes in the parent and observe whether they get reflected into child and
observe the pull concept?
Do some changes and try to move and observe collisions and resolve them by either
Accept/Skip/Merge.
Exercise 14: Workflow
Create a Workflow which can be triggered on click of Report Issue give it a name as Issue
Workflow
Create an Activity Definition which needs to call a REST Message which is created as part of
above Scripted REST API exercise. The REST call should be a GET one and it should pass the input
as the Issue Raised For and the response should be the Employee details and the Assets
regarding the employee.
Get the details form the other instance in the form of a JSON request and decode the response.
After Decoding the response create an Employee Record and Asset Record. If records are
present do not create the records.
Handle the errors during the failure/Timeout of the REST Call.
Create an IF activity for success and failure of the Activity functionality.
IF Activity fails, show a store the scratchpad as failed and vice-versa. If fails end the workflow.
IF Activity pass, then move it to the next activity.
Create a Custom Activity Designer to create Issue.
Taking the values from the previous two activities and create an Issue record and populate the
Caller and Raised For. If the IF activity fails then using the scratchpad show a message on the
Issue record saying Issue can’t be created.
Create an Activity Definition and it should be triggered when the Escalate button is clicked and it
should trigger a REST call post taking the details of the issue.
The creation of the incident should be written in the Activity definition.
Telstra Confidential 2018 - All rights reserved.
G_form is used .
Some used methods .
g_form.setValue(“<field Name>” , “<field value>”)
g_form.getValue(“<field Name>” )
g_form.setVisible(“<field Name>” ,”True/false”)
g_form.setDisplay(“<field Name>” ,”True/false”)
g_form.setMandatory(“<field Name>” ,”True/false”)
g_user.getUser
alert(“”)
Telstra Confidential 2018 - All rights reserved.