servicenow-gliderecord

Community

GlideRecord & GlideAggregate best practices.

AuthorXerrion
Version1.0.0
Installs0

System Documentation

What problem does it solve?

GlideRecord and GlideAggregate are core to ServiceNow server-side scripting, but improper usage causes performance problems and fragile code. This guide defines best practices to ensure safe, efficient data access and manipulation.

Core Features & Use Cases

  • Enforces getValue and setValue for all reads/writes to maintain type safety.
  • Requires query() before iterating with next() and discourages nested queries inside loops.
  • Prefers GlideAggregate for counting and aggregation over manual record iteration.
  • Provides practical patterns for existence checks, null handling, and update/insert/delete operations.
  • Real-world scenarios include bulk reads of incidents, aggregation by priority, and safe updates with minimized data loads.

Quick Start

Write a minimal GlideRecord script that queries active incidents, reads a field with getValue, and updates priority with setValue.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: servicenow-gliderecord
Download link: https://github.com/Xerrion/servicenow-opencode-config/archive/main.zip#servicenow-gliderecord

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.