Server Side Scripting ServiceNow
Server Side Scripting ServiceNow
ServiceNow
An Overview of Server-Side Scripting
Features
Introduction
• Server-side scripts in ServiceNow execute on
the ServiceNow instance. These scripts handle
backend logic, automate processes, and
interact with databases.
Types of Server-Side Scripts
• 1. Business Rules
• 2. Script Includes
• 3. Scheduled Jobs
• 4. Script Actions
• 5. Glide System APIs
Business Rules
• - Execute on record operations (Insert,
Update, Delete, Query)
• - Run Before, After, Async, or Display
• - Used to enforce business logic and automate
tasks
Script Includes
• - Reusable server-side scripts
• - Improve efficiency by reducing redundant
code
• - Can be used in Business Rules, UI Actions,
and other scripts
Scheduled Jobs
• - Run scripts at specific intervals
• - Automate system maintenance tasks
• - Can be set to execute once or on a recurring
schedule
Glide System APIs
• - GlideRecord: Interacts with database records
• - GlideSystem (gs): Provides logging, event
handling, etc.
• - GlideAggregate: Performs aggregations on
records
Conclusion
• Server-side scripting in ServiceNow enhances
automation, improves efficiency, and helps in
data manipulation effectively.