Book Image

Mastering ServiceNow Scripting

By : Andrew Kindred
Book Image

Mastering ServiceNow Scripting

By: Andrew Kindred

Overview of this book

Industry giants like RedHat and NetApp have adopted ServiceNow for their operational needs, and it is evolving as the number one platform choice for IT Service management. ServiceNow provides their clients with an add-on when it comes to baseline instances, where scripting can be used to customize and improve the performance of instances. It also provides inbuilt JavaScript API for scripting and improving your JavaScript instance. This book will initially cover the basics of ServiceNow scripting and the appropriate time to script in a ServiceNow environment. Then, we dig deeper into client-side and server-side scripting using JavaScipt API. We will also cover advance concepts like on-demand functions, script actions, and best practices. Mastering ServiceNow Scripting acts as an end-to-end guide for writing, testing, and debugging scripts of ServiceNow. We cover update sets for moving customizations between ServiceNow instances, jelly scripts for making custom pages, and best practices for all types of script in ServiceNow. By the end of this book, you will have hands-on experience in scripting ServiceNow using inbuilt JavaScript API.
Table of Contents (18 chapters)
Title Page
Packt Upsell
Contributors
Preface
Index

Index

A

  • access controls / Access controls
  • advanced client-side scripts
    • examples / Script examples
  • advanced server-side scripts
    • script includes / Script includes
    • scheduled jobs / Scheduled jobs
    • background scripts / Background scripts
    • workflow scripts / Workflow scripts
    • event management / Event management
    • script actions / Script actions
    • examples / Script examples
  • AJAX calls
    • about / AJAX calls
    • client-side AJAX / Client-side AJAX
    • server-side AJAX / Server-side AJAX 
  • applications
    • debugging / Debugging applications

B

  • background scripts / Background scripts
  • best practices
    • of coding / Coding best practices
    • of business rule / Business rule best practices
    • of client-side scripts / Client script best practices
    • of debugging tools / Debugging tools best practices
    • of logs and queues / Logs and queues best practices
    • of system performance / System performance best practices
    • of update sets / Update set best practices
  • best practices, debugging tools
    • about / Debugging tools best practices
    • logging / Logging
    • session debug / Session debug
  • business rule best practices
    • about / Business rule best practices
    • before option / Before
    • after option / After
    • async option / Async
    • display option / Display
  • business rules
    • of UI actions, server-side scripting / Business rules

C

  • client-side AJAX / Client-side AJAX
  • client-side glide classes
    • about / Client-side Glide classes
    • GlideForm / GlideForm
    • GlideUser / GlideUser
    • additional classes / Additional client-side Glide classes
    • script examples / Script examples
  • client-side scripts
    • about / Client scripts
    • onLoad / onLoad
    • onChange / onChange
    • onSubmit / onSubmit
    • onCellEdit / onCellEdit
    • writing / How and when to write client-side scripts
    • fields, making mandatory / Making fields mandatory, visible, or read-only
    • visible fields / Making fields mandatory, visible, or read-only
    • read-only fields / Making fields mandatory, visible, or read-only
    • fields, populating based on another field value / Populating fields based on the value of another field
    • form sections, showing/hiding / Showing/hiding form sections
    • reviewing / Review
    • testing / Testing client-side scripts
    • alert option / Alert
    • Jslog, using / Jslog
    • browser method, using / Browser
    • examples / Script examples
  • client-side UI actions / Client-side UI actions
  • client scripts
    • best practices / Client script best practices
  • coding best practices / Coding best practices
  • configuration
    • versus customization / Configuration versus customization
  • custom application
    • creating, with ServiceNow scripting / Creating a custom application with ServiceNow scripting
    • creating / Creating the application
    • building / Building the application
    • example application / Example application, Example application
    • end-to-end development / End-to-end development
    • testing / Testing
    • deployment / Deployment
  • custom application, creating
    • studio, creating / Studio
    • development stage / Application development
    • example application / Example application
  • custom application deployment
    • publishing, to update set / Publish to an update set
    • publishing, to application repository / Publish to the application repository 
    • publishing, to ServiceNow store / Publish to the ServiceNow store
    • example application / Example application

D

  • Debug window / The JavaScript Log and Debug window

E

  • event management / Event management

F

  • Field Watcher debugging functionality / The Field Watcher

J

  • JavaScript Log window / The JavaScript Log and Debug window
  • Jelly / Introduction to Jelly
  • Jelly scripts
    • about / Jelly scripting
    • evaluate tag / Evaluate
    • if tag / If
    • examples / Script examples

L

  • logs and queues best practices
    • about / Logs and queues best practices
    • logs / Logs
    • queues / Queues

Q

  • queues
    • about / Queues
    • event queue / Event queue
    • system scheduler / System scheduler
    • ECC queue / ECC queue

R

  • REST
    • debugging / Debugging REST

S

  • scheduled jobs / Scheduled jobs
  • script actions / Script actions
  • script debugger / The script debugger
  • script editor
    • about / Script editor
    • button / Script editor
  • script includes / Script includes
  • scripting / Introduction to scripting
  • scripts
    • need for / To script or not to script?
    • types / Types of script
    • server-side scripts / Types of script
    • executing / Script execution
    • client scripts / Client scripts
  • server-side AJAX / Server-side AJAX 
  • server-side glide classes
    • about / Server-side Glide classes
    • GlideSystem / GlideSystem
    • GlideDateTime / GlideDateTime
    • GlideElement / GlideElement
    • GlideAggregate / GlideAggregate
    • script examples / Script examples
  • server-side scripts
    • calling / Calling server-side script
    • writing / How and when to write server-side scripts
    • testing / Testing server-side scripts
    • examples / Script examples
  • server-side scripts, testing
    • gs.log technique, using / gs.log
    • scoped applications, logging in / Logging in scoped applications
    • session debug / Session debug
    • script debugger, using / Script debugger
  • server-side scripts, writing
    • form values, changing / Changing form values
    • access to forms and fields, restricting / Restricting access to forms and fields
    • values, passing to client side / Passing values to the client side
    • reviewing / Review
  • ServiceNow exposed JavaScript APIs
    • using / Using ServiceNow exposed JavaScript APIs
    • GlideRecord / GlideRecord
  • ServiceNow scripting
    • used, for creating custom application / Creating a custom application with ServiceNow scripting
  • session debugger / The session debugger
  • SOAP
    • debugging / SOAP debugging
  • system performance best practices / System performance best practices

U

  • UI actions
    • of advanced client-side scripts / UI actions
    • client-side UI actions / Client-side UI actions
    • server-side script, calling / Calling server-side script
    • of server-side scripting / UI actions
  • UI macros / UI macros
  • UI pages / UI pages
  • UI policies, client-side scripts / UI policies
  • update sets
    • using / When to use update sets
    • scope, using with / How to use scope with update sets
    • transferring, between instances / Transferring update sets between instances
    • pitfalls / Update set pitfalls
    • best practices / Update set best practices

W

  • workflow scripts / Workflow scripts
  • working UI page
    • creating / Script examples