The Complete ServiceNow
System Administrator Course
Section 4 - Customizations
Course Outline
1 Course Introduction 6 User Administration
2 ServiceNow Overview 7 Core Applications
3 Lists, Forms, & the UI 8 System Administration
4 Customizations 9 Building A Custom App
5 Tables & Fields 10
Section Outline
1 Client-Side vs Server-Side 6 Client Scripts
2 Customizing ServiceNow 7 Data Policies
3 UI Policies 8 Script Includes
4 UI Actions 9 Update Sets
5 Business Rules 10 Plugins
Client-Side vs Server-Side
Request
Response
• User’s browser • ServiceNow datacenters
• Limited access to instance data • Unlimited access to instance data
• Makes requests • Returns response
Customizing ServiceNow
• Very flexible
• Little you cannot change
• Many places to apply customizations:
• Client Scripts
• Business Rules
• Script Includes
• UI Actions
• UI Policies
• Data Policies
• Many more…
Covered in ServiceNow 201: Development
UI Policies
• Form control
• Run on client-side
• Easy to use (no scripting required)
• Used to set form fields to:
• Mandatory
• Read-only
• Show/Hide
1. Set an incident’s Short description field
to read-only if the incident state is
Closed
2. Hide an incident’s Resolution notes
When to use: field if the state is Open
UI Policies
UI Policies
Demo
UI Actions
• Add buttons, links, and items to context menus
• Server-side and client-side
• Leverage JavaScript
1. Trigger Salesforce integration, creating
an associated Salesforce ticket
2. Reject an approval record
When to use:
UI Actions
UI Actions
Demo
Business Rules
• Run off specific table & triggered by database operations
• JavaScript that runs on server-side
• Configure when to run
• Before
• After
• Display
• Async
• During what operation
• Insert
• Update
• Delete
• Query
Business Rules (cont.)
1. User sends request to server for specific incident (query)
2. Application server requests record from database server
3. Database server responds to application server with record
4. Application server checks for display business rules, then sends response back to client
5. User modifies incident record via form and sends update request
6. Application server receives update, checks for before business rules, then sends to database server
7. Database server updates record
8. Application server checks for after business rules
Before
1 Request 2
3
Response 4
Display After
1. Create an associated CI when a new
asset is created
2. When an incident is reopened,
increment the reopen count
When to use:
Business Rules
Business Rules
Demo
Client Scripts
• JavaScript on client-side; shipped to browser
• Form view
• Access to helper methods
• Triggers:
• On load
• On change
• On submit
• On cell edit
1. Highlight Caller field if user is a VIP
2. Run Conflict checker for Change
Management
When to use:
Client Scripts
Client Scripts
Demo
Data Policies
• UI policies for the backend
• Restrict data through imports
• Web services
1. Require the Type field on the Change
form, for web services
2. Require the Close notes on an Incident
before changing the status to Closed/
When to use: Resolved
Data Policies
Data Policies
Demo
Script Includes
• Store JavaScript functions and classes
• Reusable code
• Server-side
• Only ran when called
1. Create commonly used helper functions
2. Call a custom function via GlideAjax
When to use:
Script Includes
Script Includes
Demo
Client-Side vs Server-Side Revisited
• Client Scripts • Business Rules
• UI Policies • Script Includes
• UI Actions • UI Actions
• Data Policies
Where to Customize
UI Policy
Required, Yes
read-only, visible?
No
Client Script
Client
Client or
Server? Yes
Button or
UI Action
Server menu?
No
No Script Include
On
record action?
Yes
Business Rule
Update Sets
• Record most customizations & configurations
• Used for moving changes from instance to instance
• XML snapshot of record
• Versions & merging
• Previewing & committing
Update Sets (cont.)
What’s Captured What’s Not Captured
• Customizations previously discussed • Data, new records
• Tables & fields • Configuration Items
• Reports • Schedules
• Workflows • Users
• Forms • Groups
Plugins
• Activate plugins at any time
• May require subscriptions
• Hundreds of plugins
• Demo data
Update Sets &
Plugins
Demo
Demo