Batch 9 starts 10 Nov 2026  ·  Free demos from 3 Nov

ServiceNow

GlideRecord basics every new ServiceNow developer needs

1 min read

GlideRecord is the server-side API that ServiceNow code uses to query, create, and update records. You create an object for a table, add conditions, run the query, and loop through results. Most beginner scripts use only a handful of methods, so learning those well matters more than memorising the full API.

The patterns to practise first

  • Query with addQuery and query, then loop with next, checking one record at a time instead of loading everything.
  • Use get to fetch a single record by its system ID when you already know exactly which record you need.
  • Set field values and call update for changes, or initialize a new record and call insert for creation.
  • Limit results with setLimit when testing, so a mistake touches a handful of records instead of the whole table.

Practise in a personal developer instance, where mistakes cost nothing. Read the query back after every change until the pattern feels automatic.

← Back to the blog Book a free demo →