{
  "name": "ServiceNow Glide API cheat sheet",
  "source": "The Snowball",
  "url": "https://thesnowball.co/glide-api-cheat-sheet",
  "description": "Signature, return type, parameters and a one-line summary for each Glide API method The Snowball documents, with a link to the full page.",
  "note": "Written and maintained by The Snowball, not by ServiceNow. Behaviour can change between releases; confirm against the official ServiceNow API reference for your release (https://developer.servicenow.com/dev.do#!/reference).",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "attribution": "Free to quote and reuse with attribution (CC BY 4.0): name \"The Snowball\" and link the page you used (for example https://thesnowball.co/glide-api-cheat-sheet).",
  "recordsUpdated": "2026-03-09",
  "generatedAt": "2026-09-30T02:56:24.817Z",
  "count": 100,
  "classes": [
    {
      "name": "GlideAggregate",
      "url": "https://thesnowball.co/api/glideaggregate",
      "count": 6
    },
    {
      "name": "GlideDateTime",
      "url": "https://thesnowball.co/api/glidedatetime",
      "count": 13
    },
    {
      "name": "GlideForm",
      "url": "https://thesnowball.co/api/glideform",
      "count": 21
    },
    {
      "name": "GlideRecord",
      "url": "https://thesnowball.co/api/gliderecord",
      "count": 40
    },
    {
      "name": "GlideSystem",
      "url": "https://thesnowball.co/api/glidesystem",
      "count": 19
    },
    {
      "name": "GlideUser",
      "url": "https://thesnowball.co/api/glideuser",
      "count": 1
    }
  ],
  "methods": [
    {
      "className": "GlideAggregate",
      "method": "addAggregate",
      "signature": "ga.addAggregate(aggregateType, field)",
      "returnType": "void",
      "parameters": [
        {
          "name": "aggregateType",
          "type": "string",
          "required": true,
          "description": "The aggregate operation to perform: 'COUNT', 'SUM', 'MIN', 'MAX', or 'AVG'. Case-sensitive. For COUNT operations, you can omit the field parameter to count all records."
        },
        {
          "name": "field",
          "type": "string",
          "required": false,
          "description": "The field name to aggregate against. Required for SUM, MIN, MAX, and AVG operations. Optional for COUNT — omit it to count records, include it to count non-null values in that field."
        }
      ],
      "summary": "Adds aggregate operations (COUNT, SUM, MIN, MAX, AVG) to GlideAggregate queries. Essential for reporting and analytics.",
      "url": "https://thesnowball.co/api/glideaggregate/glideaggregate-addaggregate",
      "updatedAt": "2026-03-09T03:24:11Z"
    },
    {
      "className": "GlideAggregate",
      "method": "addQuery",
      "signature": "ga.addQuery(name, value)",
      "returnType": "GlideQueryCondition",
      "parameters": [
        {
          "name": "name",
          "type": "string",
          "required": true,
          "description": "The field name to filter on. Accepts dot-walking syntax for reference fields like 'caller_id.department'. Supports all the same field references as GlideRecord queries."
        },
        {
          "name": "value",
          "type": "string",
          "required": true,
          "description": "The value to filter for. Supports operators like '!=', 'STARTSWITH', 'CONTAINS' when prefixed to the value. Default operator is equals when no operator is specified."
        }
      ],
      "summary": "Filter your GlideAggregate results with addQuery(). Works identically to GlideRecord.addQuery() but for aggregate queries. Returns GlideQueryCondition.",
      "url": "https://thesnowball.co/api/glideaggregate/glideaggregate-addquery",
      "updatedAt": "2026-03-09T03:24:12Z"
    },
    {
      "className": "GlideAggregate",
      "method": "getAggregate",
      "signature": "ga.getAggregate(aggregateType, field)",
      "returnType": "string",
      "parameters": [
        {
          "name": "aggregateType",
          "type": "string",
          "required": true,
          "description": "The aggregate function to retrieve: COUNT, SUM, AVG, MIN, or MAX. Must match exactly what was added with `addAggregate()`. Case-sensitive and will return empty string if no match is found."
        },
        {
          "name": "field",
          "type": "string",
          "required": true,
          "description": "The field name that was aggregated. For COUNT operations, this is typically the field passed to `addAggregate()`. Must match the exact field name used when creating the aggregate."
        }
      ],
      "summary": "Returns the result of an aggregate function as a string. Must be called after next() to get values for the current group.",
      "url": "https://thesnowball.co/api/glideaggregate/glideaggregate-getaggregate",
      "updatedAt": "2026-03-09T03:24:13Z"
    },
    {
      "className": "GlideAggregate",
      "method": "groupBy",
      "signature": "ga.groupBy(fieldName)",
      "returnType": "void",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The field name to group results by. Must be a valid field on the table being queried. Can be reference fields using dot notation like 'assignment_group.name'."
        }
      ],
      "summary": "Groups GlideAggregate results by field for COUNT, SUM, and other aggregates. Essential for reports broken down by category or assignment group.",
      "url": "https://thesnowball.co/api/glideaggregate/glideaggregate-groupby",
      "updatedAt": "2026-03-09T03:24:14Z"
    },
    {
      "className": "GlideAggregate",
      "method": "orderByAggregate",
      "signature": "ga.orderByAggregate(aggregateType, field)",
      "returnType": "void",
      "parameters": [
        {
          "name": "aggregateType",
          "type": "string",
          "required": true,
          "description": "The aggregate function to order by: 'COUNT', 'SUM', 'AVG', 'MIN', or 'MAX'. Must match an aggregate function already added to the query with addAggregate(). Case-sensitive and will silently fail if the aggregate doesn't exist."
        },
        {
          "name": "field",
          "type": "string",
          "required": true,
          "description": "The field name used in the aggregate calculation. Must exactly match the field parameter from the corresponding addAggregate() call. For COUNT aggregates, this is typically the primary key field like 'sys_id'."
        }
      ],
      "summary": "Orders GlideAggregate grouped results by aggregate values. Essential for finding top-N groups like assignment groups with most incidents or users with highest scores.",
      "url": "https://thesnowball.co/api/glideaggregate/glideaggregate-orderbyaggregate",
      "updatedAt": "2026-03-09T03:24:15Z"
    },
    {
      "className": "GlideAggregate",
      "method": "setGroup",
      "signature": "ga.setGroup(isGrouped)",
      "returnType": "void",
      "parameters": [
        {
          "name": "isGrouped",
          "type": "boolean",
          "required": true,
          "description": "When true (default), groups results by fields specified in groupBy(). When false, ignores all groupBy() calls and returns a single aggregate across all matching records. Must be called before query() to take effect."
        }
      ],
      "summary": "Control whether GlideAggregate groups results or returns a single aggregate across all records. Essential for handling totals vs grouped calculations.",
      "url": "https://thesnowball.co/api/glideaggregate/glideaggregate-setgroup",
      "updatedAt": "2026-03-09T03:24:16Z"
    },
    {
      "className": "GlideDateTime",
      "method": "addDays",
      "signature": "gdt.addDays(days)",
      "returnType": "void",
      "parameters": [
        {
          "name": "days",
          "type": "number",
          "required": true,
          "description": "The number of days to add to the GlideDateTime object. Can be positive (future dates) or negative (past dates). Accepts integers and floating-point numbers, though fractional days are truncated to whole days."
        }
      ],
      "summary": "Add days to a GlideDateTime object in ServiceNow. Handles month boundaries and leap years automatically. Modifies the object in place.",
      "url": "https://thesnowball.co/api/glidedatetime/glidedatetime-adddays",
      "updatedAt": "2026-03-09T03:24:17Z"
    },
    {
      "className": "GlideDateTime",
      "method": "addSeconds",
      "signature": "gdt.addSeconds(seconds)",
      "returnType": "void",
      "parameters": [
        {
          "name": "seconds",
          "type": "number",
          "required": true,
          "description": "The number of seconds to add to the GlideDateTime object. Can be negative to subtract seconds. Must be a numeric value or ServiceNow will treat it as 0."
        }
      ],
      "summary": "Add or subtract seconds from a GlideDateTime object. Accepts negative values for subtraction. Essential for precise time calculations in ServiceNow.",
      "url": "https://thesnowball.co/api/glidedatetime/glidedatetime-addseconds",
      "updatedAt": "2026-03-09T03:24:18Z"
    },
    {
      "className": "GlideDateTime",
      "method": "after",
      "signature": "gdt.after(other)",
      "returnType": "boolean",
      "parameters": [
        {
          "name": "other",
          "type": "GlideDateTime",
          "required": true,
          "description": "The GlideDateTime object to compare against. Must be a valid GlideDateTime instance - passing null, undefined, or non-GlideDateTime objects will cause the method to return false without throwing an error."
        }
      ],
      "summary": "Compare GlideDateTime objects to check if one comes after another. Essential for date range validation, SLA calculations, and workflow logic in ServiceNow.",
      "url": "https://thesnowball.co/api/glidedatetime/glidedatetime-after",
      "updatedAt": "2026-03-09T03:24:19Z"
    },
    {
      "className": "GlideDateTime",
      "method": "before",
      "signature": "gdt.before(other)",
      "returnType": "boolean",
      "parameters": [
        {
          "name": "other",
          "type": "GlideDateTime",
          "required": true,
          "description": "The GlideDateTime object to compare against. Must be a valid GlideDateTime instance—passing null, undefined, or other data types will cause the method to fail. Both objects must contain valid datetime values for accurate comparison."
        }
      ],
      "summary": "Compare GlideDateTime objects chronologically. Returns true if this datetime is before another. Clean alternative to numeric comparisons.",
      "url": "https://thesnowball.co/api/glidedatetime/glidedatetime-before",
      "updatedAt": "2026-03-09T03:24:20Z"
    },
    {
      "className": "GlideDateTime",
      "method": "compareTo",
      "signature": "gdt.compareTo(other)",
      "returnType": "number",
      "parameters": [
        {
          "name": "other",
          "type": "GlideDateTime",
          "required": true,
          "description": "The GlideDateTime object to compare against. Must be a valid GlideDateTime instance or the method will throw a runtime error. String dates and JavaScript Date objects are not automatically converted."
        }
      ],
      "summary": "Compare two GlideDateTime objects for chronological order. Returns negative, zero, or positive values for sorting and three-way date comparisons.",
      "url": "https://thesnowball.co/api/glidedatetime/glidedatetime-compareto",
      "updatedAt": "2026-03-09T03:24:21Z"
    },
    {
      "className": "GlideDateTime",
      "method": "getDayOfMonth",
      "signature": "gdt.getDayOfMonth()",
      "returnType": "number",
      "parameters": [],
      "summary": "Get the day of month (1-31) in UTC from a GlideDateTime. Returns number, not string. Use getDayOfMonthLocalTime() for user timezone conversion.",
      "url": "https://thesnowball.co/api/glidedatetime/glidedatetime-getdayofmonth",
      "updatedAt": "2026-03-09T03:24:22Z"
    },
    {
      "className": "GlideDateTime",
      "method": "getDisplayValue",
      "signature": "gdt.getDisplayValue()",
      "returnType": "string",
      "parameters": [],
      "summary": "Returns GlideDateTime formatted for the current user's timezone and display preferences. Essential for user-facing date/time output in ServiceNow.",
      "url": "https://thesnowball.co/api/glidedatetime/glidedatetime-getdisplayvalue",
      "updatedAt": "2026-03-09T03:24:23Z"
    },
    {
      "className": "GlideDateTime",
      "method": "getMonthValue",
      "signature": "gdt.getMonthValue()",
      "returnType": "number",
      "parameters": [],
      "summary": "Get the month (1-12) from a GlideDateTime in UTC. Returns integer from 1 (January) to 12 (December). Essential for date filtering and calculations.",
      "url": "https://thesnowball.co/api/glidedatetime/glidedatetime-getmonthvalue",
      "updatedAt": "2026-03-09T03:24:24Z"
    },
    {
      "className": "GlideDateTime",
      "method": "getNumericValue",
      "signature": "gdt.getNumericValue()",
      "returnType": "number",
      "parameters": [],
      "summary": "Convert GlideDateTime to milliseconds since Unix epoch. Essential for duration calculations and date comparisons in ServiceNow server scripts.",
      "url": "https://thesnowball.co/api/glidedatetime/glidedatetime-getnumericvalue",
      "updatedAt": "2026-03-09T03:24:25Z"
    },
    {
      "className": "GlideDateTime",
      "method": "getValue",
      "signature": "gdt.getValue()",
      "returnType": "string",
      "parameters": [],
      "summary": "Get the internal string representation of a GlideDateTime in UTC format. Returns yyyy-MM-dd HH:mm:ss for database storage and comparisons.",
      "url": "https://thesnowball.co/api/glidedatetime/glidedatetime-getvalue",
      "updatedAt": "2026-03-09T03:24:26Z"
    },
    {
      "className": "GlideDateTime",
      "method": "getYearValue",
      "signature": "gdt.getYearValue()",
      "returnType": "number",
      "parameters": [],
      "summary": "Extract the four-digit year from a GlideDateTime object in UTC. Essential for date calculations, reporting filters, and business rules.",
      "url": "https://thesnowball.co/api/glidedatetime/glidedatetime-getyearvalue",
      "updatedAt": "2026-03-09T03:24:27Z"
    },
    {
      "className": "GlideDateTime",
      "method": "setDisplayValue",
      "signature": "gdt.setDisplayValue(value)",
      "returnType": "void",
      "parameters": [
        {
          "name": "value",
          "type": "string",
          "required": true,
          "description": "A date/time string in display format (user's timezone and format preferences). Accepts formats like 'MM-dd-yyyy HH:mm:ss' or 'yyyy-MM-dd HH:mm:ss' depending on user settings. Invalid formats are silently ignored, leaving the GlideDateTime unchanged."
        }
      ],
      "summary": "Sets date/time from display-format string in user's timezone. ServiceNow converts to UTC internally. Essential for handling user date input.",
      "url": "https://thesnowball.co/api/glidedatetime/glidedatetime-setdisplayvalue",
      "updatedAt": "2026-03-09T03:24:28Z"
    },
    {
      "className": "GlideDateTime",
      "method": "setValue",
      "signature": "gdt.setValue(value)",
      "returnType": "void",
      "parameters": [
        {
          "name": "value",
          "type": "string | Date | GlideDateTime",
          "required": true,
          "description": "The date/time value to set. Strings must be in ServiceNow's internal format (YYYY-MM-DD HH:mm:ss). JavaScript Date objects are automatically converted from local time to UTC. Other GlideDateTime objects are copied directly."
        }
      ],
      "summary": "Sets GlideDateTime value from string, JavaScript Date, or GlideDateTime. Converts to UTC internally. Complete guide with gotchas and working examples.",
      "url": "https://thesnowball.co/api/glidedatetime/glidedatetime-setvalue",
      "updatedAt": "2026-03-09T03:24:29Z"
    },
    {
      "className": "GlideForm",
      "method": "addErrorMessage",
      "signature": "g_form.addErrorMessage(message)",
      "returnType": "void",
      "parameters": [
        {
          "name": "message",
          "type": "string",
          "required": true,
          "description": "The error message text to display to the user. HTML is not rendered - the message displays as plain text only. Empty strings will display as blank error messages."
        }
      ],
      "summary": "Display red error messages at the top of ServiceNow forms. Essential for client-side validation and user feedback in forms.",
      "url": "https://thesnowball.co/api/glideform/glideform-adderrormessage",
      "updatedAt": "2026-03-09T03:24:30Z"
    },
    {
      "className": "GlideForm",
      "method": "addInfoMessage",
      "signature": "g_form.addInfoMessage(message)",
      "returnType": "void",
      "parameters": [
        {
          "name": "message",
          "type": "string",
          "required": true,
          "description": "The text to display in the info message. HTML content is escaped and displayed as plain text. Empty strings and null values will display a blank message box."
        }
      ],
      "summary": "Display blue info messages at the top of ServiceNow forms. Learn proper usage, scope limitations, and when to use alternatives like showFieldMsg().",
      "url": "https://thesnowball.co/api/glideform/glideform-addinfomessage",
      "updatedAt": "2026-03-09T03:24:31Z"
    },
    {
      "className": "GlideForm",
      "method": "clearMessages",
      "signature": "g_form.clearMessages()",
      "returnType": "void",
      "parameters": [],
      "summary": "Remove all info and error messages from ServiceNow forms. Essential client-side method for clearing notification messages after validation or updates.",
      "url": "https://thesnowball.co/api/glideform/glideform-clearmessages",
      "updatedAt": "2026-03-09T03:24:33Z"
    },
    {
      "className": "GlideForm",
      "method": "clearValue",
      "signature": "g_form.clearValue(fieldName)",
      "returnType": "void",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The name of the field to clear. Must be a valid field name on the current form's table. Reference fields will have both their display value and sys_id cleared."
        }
      ],
      "summary": "Clears field values on ServiceNow forms, including both display and sys_id for reference fields. Essential for dynamic form behavior in client scripts.",
      "url": "https://thesnowball.co/api/glideform/glideform-clearvalue",
      "updatedAt": "2026-03-09T03:24:34Z"
    },
    {
      "className": "GlideForm",
      "method": "flashField",
      "signature": "g_form.flashField(fieldName, color, count)",
      "returnType": "void",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The field name to flash. Must be a valid field on the current form that exists in the DOM. Field must be visible to the user for the flash effect to work."
        },
        {
          "name": "color",
          "type": "string",
          "required": true,
          "description": "Hex color code including the # symbol (e.g., '#FF0000' for red). Invalid hex codes default to red. Bright colors work best for visibility."
        },
        {
          "name": "count",
          "type": "number",
          "required": true,
          "description": "Number of times to flash the field. Each flash cycle takes approximately 500ms. Values less than 1 result in no flash."
        }
      ],
      "summary": "Flash a field with color to draw user attention. Covers hex colors, flash count, timing behavior, and when to use this advanced UI feedback technique.",
      "url": "https://thesnowball.co/api/glideform/glideform-flashfield",
      "updatedAt": "2026-03-09T03:24:35Z"
    },
    {
      "className": "GlideForm",
      "method": "getControl",
      "signature": "g_form.getControl(fieldName)",
      "returnType": "HTMLElement",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The field name whose DOM control you want to access. Must be a valid field on the current form. Returns null if the field doesn't exist or isn't rendered."
        }
      ],
      "summary": "Returns the DOM element for a field's input control. Use for direct DOM manipulation when standard GlideForm APIs aren't sufficient.",
      "url": "https://thesnowball.co/api/glideform/glideform-getcontrol",
      "updatedAt": "2026-03-09T03:24:36Z"
    },
    {
      "className": "GlideForm",
      "method": "getDisplayValue",
      "signature": "g_form.getDisplayValue(fieldName)",
      "returnType": "string",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The field name to retrieve the display value from. Must be a valid field on the current form's table. Returns empty string if field doesn't exist or has no value."
        }
      ],
      "summary": "Returns the display label for any field. Gets reference record display names and choice field labels, not the underlying values stored in database.",
      "url": "https://thesnowball.co/api/glideform/glideform-getdisplayvalue",
      "updatedAt": "2026-03-09T03:24:37Z"
    },
    {
      "className": "GlideForm",
      "method": "getReference",
      "signature": "g_form.getReference(fieldName, callback)",
      "returnType": "void",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The name of the reference field to retrieve. Must be a valid reference field on the current form. Will fail silently if the field doesn't exist or isn't a reference field."
        },
        {
          "name": "callback",
          "type": "function",
          "required": true,
          "description": "Function called when the reference is retrieved. Receives a single parameter: a GlideRecord-like object with the referenced record's data. The object contains display values, not raw database values."
        }
      ],
      "summary": "Asynchronously fetch referenced records from the client-side with full display values. Essential for loading reference data in UI scripts.",
      "url": "https://thesnowball.co/api/glideform/glideform-getreference",
      "updatedAt": "2026-03-09T03:24:38Z"
    },
    {
      "className": "GlideForm",
      "method": "getTableName",
      "signature": "g_form.getTableName()",
      "returnType": "string",
      "parameters": [],
      "summary": "Returns the table name of the current form in client scripts. Essential for shared code that handles multiple table types in ServiceNow.",
      "url": "https://thesnowball.co/api/glideform/glideform-gettablename",
      "updatedAt": "2026-03-09T03:24:39Z"
    },
    {
      "className": "GlideForm",
      "method": "getUniqueValue",
      "signature": "g_form.getUniqueValue()",
      "returnType": "string",
      "parameters": [],
      "summary": "Returns the sys_id of the current record in client-side scripts. Essential for identifying records in UI Policies, Client Scripts, and UI Actions.",
      "url": "https://thesnowball.co/api/glideform/glideform-getuniquevalue",
      "updatedAt": "2026-03-09T03:24:40Z"
    },
    {
      "className": "GlideForm",
      "method": "getValue",
      "signature": "g_form.getValue(fieldName)",
      "returnType": "string",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The name of the field to retrieve the value from. Must be a valid field name on the current form. Case-sensitive and must match the field's database column name exactly."
        }
      ],
      "summary": "Returns the internal value of form fields. For reference fields returns sys_id, for choice fields returns stored value. Essential client-side method.",
      "url": "https://thesnowball.co/api/glideform/glideform-getvalue",
      "updatedAt": "2026-03-09T03:24:41Z"
    },
    {
      "className": "GlideForm",
      "method": "hideFieldMsg",
      "signature": "g_form.hideFieldMsg(fieldName, clearAll)",
      "returnType": "void",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The name of the field from which to hide messages. Must match the actual field name on the form, not the field label. Case-sensitive and will fail silently if the field doesn't exist on the current form."
        },
        {
          "name": "clearAll",
          "type": "boolean",
          "required": false,
          "description": "When true, removes all messages for the specified field. When false or omitted, removes only the most recently added message. Optional parameter that defaults to false if not provided."
        }
      ],
      "summary": "Hides field-level messages in ServiceNow forms. Control whether to clear just the latest message or all messages for a field. Client-side only.",
      "url": "https://thesnowball.co/api/glideform/glideform-hidefieldmsg",
      "updatedAt": "2026-03-09T03:24:42Z"
    },
    {
      "className": "GlideForm",
      "method": "save",
      "signature": "g_form.save()",
      "returnType": "void",
      "parameters": [],
      "summary": "Save a form without navigation in ServiceNow. Triggers all save Business Rules and UI Policies while keeping users on the current record.",
      "url": "https://thesnowball.co/api/glideform/glideform-save",
      "updatedAt": "2026-03-09T03:24:43Z"
    },
    {
      "className": "GlideForm",
      "method": "setLabel",
      "signature": "g_form.setLabel(fieldName, label)",
      "returnType": "void",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The field name (column name) whose label you want to change. Must be a valid field on the current table. Case-sensitive and must match the exact field name in the dictionary."
        },
        {
          "name": "label",
          "type": "string",
          "required": true,
          "description": "The new label text to display. Accepts plain text or HTML content. Empty string will hide the label entirely, null or undefined will reset to the original dictionary label."
        }
      ],
      "summary": "Dynamically change field labels on ServiceNow forms at runtime. Client-side only, temporary changes that don't affect the data dictionary. Complete reference.",
      "url": "https://thesnowball.co/api/glideform/glideform-setlabel",
      "updatedAt": "2026-03-09T03:24:44Z"
    },
    {
      "className": "GlideForm",
      "method": "setMandatory",
      "signature": "g_form.setMandatory(fieldName, mandatory)",
      "returnType": "void",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The name of the field to make mandatory or optional. Must match the exact field name from the table dictionary. Case-sensitive and will fail silently if the field doesn't exist on the current form."
        },
        {
          "name": "mandatory",
          "type": "boolean",
          "required": true,
          "description": "Whether the field should be mandatory (true) or optional (false). When true, adds a red asterisk and prevents form submission if empty. When false, removes mandatory indication and allows empty values."
        }
      ],
      "summary": "Make ServiceNow form fields required or optional client-side with g_form.setMandatory(). Client-only changes that don't affect server validation.",
      "url": "https://thesnowball.co/api/glideform/glideform-setmandatory",
      "updatedAt": "2026-03-09T03:24:45Z"
    },
    {
      "className": "GlideForm",
      "method": "setReadOnly",
      "signature": "g_form.setReadOnly(fieldName, readOnly)",
      "returnType": "void",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The field name to modify. Must be a valid field on the current table or the method silently fails. Reference fields use just the field name, not the display value field."
        },
        {
          "name": "readOnly",
          "type": "boolean",
          "required": true,
          "description": "True makes the field read-only, false makes it writable. JavaScript truthy/falsy values work but explicit booleans are cleaner. Setting false won't override server-side read-only enforcement from ACLs or field definitions."
        }
      ],
      "summary": "Make form fields read-only on the client side. Client-only enforcement - combine with ACLs for real security.",
      "url": "https://thesnowball.co/api/glideform/glideform-setreadonly",
      "updatedAt": "2026-03-09T03:24:46Z"
    },
    {
      "className": "GlideForm",
      "method": "setSectionDisplay",
      "signature": "g_form.setSectionDisplay(sectionName, display)",
      "returnType": "boolean",
      "parameters": [
        {
          "name": "sectionName",
          "type": "string",
          "required": true,
          "description": "The section name as lowercase text with spaces replaced by underscores. Must match exactly how ServiceNow internally references the section, not the display label. Case sensitive."
        },
        {
          "name": "display",
          "type": "boolean",
          "required": true,
          "description": "Whether to show (`true`) or hide (`false`) the section. Hiding a section also hides all fields within that section regardless of individual field visibility settings."
        }
      ],
      "summary": "Hide or show entire form sections dynamically with setSectionDisplay(). Returns boolean success status. Handles section name translation automatically.",
      "url": "https://thesnowball.co/api/glideform/glideform-setsectiondisplay",
      "updatedAt": "2026-03-09T03:24:47Z"
    },
    {
      "className": "GlideForm",
      "method": "setValue",
      "signature": "g_form.setValue(fieldName, value, displayValue)",
      "returnType": "void",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The field name to modify on the current form. Must match the column name exactly as defined in the dictionary. Case-sensitive and will fail silently if the field doesn't exist on the form."
        },
        {
          "name": "value",
          "type": "string | number | boolean",
          "required": true,
          "description": "The value to assign to the field. For reference fields, this must be the sys_id of the referenced record. For choice fields, use the choice value, not the label."
        },
        {
          "name": "displayValue",
          "type": "string",
          "required": false,
          "description": "Optional display value for reference fields. When provided, this text appears in the reference field instead of showing the sys_id. Required for reference fields to display human-readable values."
        }
      ],
      "summary": "Set field values on forms without saving in ServiceNow. Essential for client scripts, UI policies. Handles reference fields, display values, validation.",
      "url": "https://thesnowball.co/api/glideform/glideform-setvalue",
      "updatedAt": "2026-03-09T03:24:48Z"
    },
    {
      "className": "GlideForm",
      "method": "setVisible",
      "signature": "g_form.setVisible(fieldName, display)",
      "returnType": "void",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The field name to show or hide. Must be a valid field on the current form table. Use the actual field name from the dictionary, not the field label."
        },
        {
          "name": "display",
          "type": "boolean",
          "required": true,
          "description": "Controls visibility: true shows the field, false hides it. Hidden fields retain their values and are still submitted with the form. Does not affect mandatory validation on hidden fields."
        }
      ],
      "summary": "Show or hide form fields client-side in ServiceNow. Controls display without affecting values. Essential for dynamic forms and conditional visibility.",
      "url": "https://thesnowball.co/api/glideform/glideform-setvisible",
      "updatedAt": "2026-03-09T03:24:49Z"
    },
    {
      "className": "GlideForm",
      "method": "showFieldMsg",
      "signature": "g_form.showFieldMsg(fieldName, message, type)",
      "returnType": "void",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The field name where the message should appear. Must be a valid field on the current table. Message appears directly below the field input."
        },
        {
          "name": "message",
          "type": "string",
          "required": true,
          "description": "The text to display to the user. HTML is not rendered - treated as plain text. Empty strings will clear existing messages for that field."
        },
        {
          "name": "type",
          "type": "string",
          "required": true,
          "description": "Either 'info' (blue styling) or 'error' (red styling). Invalid types default to 'info'. Case-sensitive - 'Error' or 'INFO' won't work."
        }
      ],
      "summary": "Display contextual info or error messages directly under specific fields. More precise than global messages for field validation and user guidance.",
      "url": "https://thesnowball.co/api/glideform/glideform-showfieldmsg",
      "updatedAt": "2026-03-09T03:24:50Z"
    },
    {
      "className": "GlideForm",
      "method": "submit",
      "signature": "g_form.submit()",
      "returnType": "void",
      "parameters": [],
      "summary": "Submits the form and navigates away after save, equivalent to clicking Save. Essential for custom client-side form submission patterns.",
      "url": "https://thesnowball.co/api/glideform/glideform-submit",
      "updatedAt": "2026-03-09T03:24:51Z"
    },
    {
      "className": "GlideRecord",
      "method": "addActiveQuery",
      "signature": "addActiveQuery()",
      "returnType": "void",
      "parameters": [],
      "summary": "Shorthand for addQuery('active', true) that filters GlideRecord queries to only return active records. Essential method for most data queries.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-addactivequery",
      "updatedAt": "2026-03-09T03:24:52Z"
    },
    {
      "className": "GlideRecord",
      "method": "addEncodedQuery",
      "signature": "addEncodedQuery(query)",
      "returnType": "void",
      "parameters": [
        {
          "name": "query",
          "type": "string",
          "required": true,
          "description": "An encoded query string using ServiceNow's query syntax (field^operator^value). Multiple conditions are separated by '^' characters. Empty strings are ignored but null values throw errors."
        }
      ],
      "summary": "Adds encoded query strings to GlideRecord filters. Copy queries from UI filter breadcrumbs. Chain multiple conditions with AND logic.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-addencodedquery",
      "updatedAt": "2026-03-09T03:24:53Z"
    },
    {
      "className": "GlideRecord",
      "method": "addJoinQuery",
      "signature": "addJoinQuery(joinTable, primaryField, joinTableField)",
      "returnType": "GlideQueryCondition",
      "parameters": [
        {
          "name": "joinTable",
          "type": "string",
          "required": true,
          "description": "The table name to join to. Must be a valid table name in the system. ServiceNow will create an INNER JOIN to this table using the specified field relationship."
        },
        {
          "name": "primaryField",
          "type": "string",
          "required": true,
          "description": "The field on your current GlideRecord table that contains the reference to the join table. Typically a reference field like 'assigned_to' or 'caller_id'. Must exist on the current table."
        },
        {
          "name": "joinTableField",
          "type": "string",
          "required": true,
          "description": "The field on the joined table to match against. Usually 'sys_id' but can be any field on the target table. The join condition becomes primaryField = joinTable.joinTableField."
        }
      ],
      "summary": "Adds a JOIN query to your GlideRecord, returning a GlideQueryCondition for filtering on the joined table. Essential for complex multi-table queries.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-addjoinquery",
      "updatedAt": "2026-03-09T03:24:54Z"
    },
    {
      "className": "GlideRecord",
      "method": "addNotNullQuery",
      "signature": "addNotNullQuery(fieldName)",
      "returnType": "GlideQueryCondition",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The name of the field to check for non-null values. Accepts any valid field name including reference fields, choice fields, and regular columns. The field name is case-sensitive and must match the exact column name in the database."
        }
      ],
      "summary": "Adds IS NOT NULL condition to GlideRecord queries. Essential for filtering out empty reference fields and null values. Returns GlideQueryCondition.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-addnotnullquery",
      "updatedAt": "2026-03-09T03:24:55Z"
    },
    {
      "className": "GlideRecord",
      "method": "addNullQuery",
      "signature": "addNullQuery(fieldName)",
      "returnType": "GlideQueryCondition",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The name of the field to check for null values. Must be a valid field on the table being queried. Dictionary field names are case-sensitive and should match exactly as defined in the dictionary."
        }
      ],
      "summary": "Add IS NULL conditions to GlideRecord queries in ServiceNow. Returns GlideQueryCondition for chaining. Equivalent to addQuery(field, 'ISEMPTY', '').",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-addnullquery",
      "updatedAt": "2026-03-09T03:24:56Z"
    },
    {
      "className": "GlideRecord",
      "method": "addOrCondition",
      "signature": "addOrCondition(name, value)",
      "returnType": "GlideQueryCondition",
      "parameters": [
        {
          "name": "name",
          "type": "string",
          "required": true,
          "description": "The field name to query against. Must be a valid field on the table being queried. Can include dot-walking syntax for reference fields like 'caller_id.department'."
        },
        {
          "name": "value",
          "type": "string | number | boolean",
          "required": true,
          "description": "The value to compare against the field. ServiceNow automatically handles type conversion. Uses equals comparison by default, but you can include operators in the field name."
        }
      ],
      "summary": "Adds OR conditions to GlideRecord queries by chaining off the GlideQueryCondition returned by addQuery. Essential for complex query logic in ServiceNow.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-addorcondition",
      "updatedAt": "2026-03-09T03:24:57Z"
    },
    {
      "className": "GlideRecord",
      "method": "addQuery",
      "signature": "addQuery(name, value)",
      "returnType": "GlideQueryCondition",
      "parameters": [
        {
          "name": "name",
          "type": "string",
          "required": true,
          "description": "Field name to filter on. Must be a valid field on the target table or related table using dot-walking syntax. Case-sensitive and must match the database column name exactly."
        },
        {
          "name": "value",
          "type": "string | number | boolean",
          "required": true,
          "description": "Value to compare against the field. String values support encoded query operators like STARTSWITH, CONTAINS. Numeric and boolean values perform exact matches unless operators are specified."
        }
      ],
      "summary": "Adds WHERE conditions to GlideRecord queries. Returns GlideQueryCondition for OR chaining. Essential method for filtering records in ServiceNow.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-addquery",
      "updatedAt": "2026-03-09T03:24:59Z"
    },
    {
      "className": "GlideRecord",
      "method": "addQuery",
      "signature": "addQuery(name, operator, value)",
      "returnType": "GlideQueryCondition",
      "parameters": [
        {
          "name": "name",
          "type": "string",
          "required": true,
          "description": "Field name to query against. Must be a valid column name on the table. Supports dot-walking for reference fields like 'caller_id.department'."
        },
        {
          "name": "operator",
          "type": "string",
          "required": true,
          "description": "Query operator: =, !=, <, >, <=, >=, STARTSWITH, ENDSWITH, CONTAINS, DOES NOT CONTAIN, IN, NOT IN, INSTANCEOF. Case-sensitive and must match exactly."
        },
        {
          "name": "value",
          "type": "string | number | boolean",
          "required": true,
          "description": "Value to compare against. Arrays and comma-separated strings work with IN/NOT IN operators. Boolean fields accept 'true'/'false' strings or actual booleans."
        }
      ],
      "summary": "Add WHERE conditions to GlideRecord queries with explicit operators. Returns GlideQueryCondition for chaining and OR operations. Server-side only.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-addquery-operator",
      "updatedAt": "2026-03-09T03:25:00Z"
    },
    {
      "className": "GlideRecord",
      "method": "autoSysFields",
      "signature": "autoSysFields(enable)",
      "returnType": "void",
      "parameters": [
        {
          "name": "enable",
          "type": "boolean",
          "required": true,
          "description": "When true (default), ServiceNow automatically updates system audit fields during database operations. When false, preserves existing values of sys_updated_on, sys_updated_by, and sys_mod_count. Setting applies only to the current GlideRecord instance."
        }
      ],
      "summary": "Controls whether ServiceNow auto-updates sys_updated_on, sys_updated_by, and sys_mod_count on GlideRecord operations. Essential for data migrations.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-autosysfields",
      "updatedAt": "2026-03-09T03:25:01Z"
    },
    {
      "className": "GlideRecord",
      "method": "canRead",
      "signature": "canRead()",
      "returnType": "boolean",
      "parameters": [],
      "summary": "Check if current user has read access to a GlideRecord without throwing ACL errors. Returns boolean true/false for secure permission testing.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-canread",
      "updatedAt": "2026-03-09T03:25:03Z"
    },
    {
      "className": "GlideRecord",
      "method": "canWrite",
      "signature": "canWrite()",
      "returnType": "boolean",
      "parameters": [],
      "summary": "Check if current user can write to a GlideRecord before setValue/update. Prevents silent permission failures and ACL violations in server-side scripts.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-canwrite",
      "updatedAt": "2026-03-09T03:25:04Z"
    },
    {
      "className": "GlideRecord",
      "method": "chooseWindow",
      "signature": "chooseWindow(firstRow, lastRow)",
      "returnType": "void",
      "parameters": [
        {
          "name": "firstRow",
          "type": "number",
          "required": true,
          "description": "Zero-indexed starting row position for the result window. Must be a non-negative integer or the method throws an error. Setting this to 0 starts from the first record in the result set."
        },
        {
          "name": "lastRow",
          "type": "number",
          "required": true,
          "description": "Zero-indexed ending row position for the result window (inclusive). Must be greater than or equal to firstRow. Setting this beyond the actual record count simply returns all available records within the window."
        }
      ],
      "summary": "Paginate GlideRecord results by specifying a zero-indexed row window. Essential for processing large datasets without memory exhaustion in ServiceNow.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-choosewindow",
      "updatedAt": "2026-03-09T03:25:05Z"
    },
    {
      "className": "GlideRecord",
      "method": "deleteMultiple",
      "signature": "deleteMultiple()",
      "returnType": "void",
      "parameters": [],
      "summary": "Bulk delete all ServiceNow records matching a query without Business Rules or notifications. Dangerous but fast. Learn safe patterns and gotchas.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-deletemultiple",
      "updatedAt": "2026-03-09T03:25:07Z"
    },
    {
      "className": "GlideRecord",
      "method": "deleteRecord",
      "signature": "deleteRecord()",
      "returnType": "boolean",
      "parameters": [],
      "summary": "Deletes the current GlideRecord from the database. Returns true on success. Triggers delete business rules and requires delete ACL permissions.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-deleterecord",
      "updatedAt": "2026-03-09T03:25:08Z"
    },
    {
      "className": "GlideRecord",
      "method": "get",
      "signature": "get(sys_id)",
      "returnType": "boolean",
      "parameters": [
        {
          "name": "sys_id",
          "type": "string",
          "required": true,
          "description": "The 32-character sys_id of the record to retrieve. Accepts empty strings (returns false) but throws errors for null or undefined values. Leading/trailing whitespace is automatically trimmed."
        }
      ],
      "summary": "Retrieves a single ServiceNow record by sys_id. Returns boolean. More efficient than query() for single-record lookups. Essential GlideRecord method.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-get",
      "updatedAt": "2026-03-09T03:25:09Z"
    },
    {
      "className": "GlideRecord",
      "method": "getDisplayValue",
      "signature": "getDisplayValue(fieldName)",
      "returnType": "string",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The field name to get the display value from. Must be a valid field on the current table. If the field doesn't exist, returns an empty string."
        }
      ],
      "summary": "Returns human-readable display values for reference fields and choice labels. Essential for UI display and reporting in ServiceNow server-side scripts.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-getdisplayvalue",
      "updatedAt": "2026-03-09T03:25:10Z"
    },
    {
      "className": "GlideRecord",
      "method": "getEncodedQuery",
      "signature": "getEncodedQuery()",
      "returnType": "string",
      "parameters": [],
      "summary": "Returns the current GlideRecord query as an encoded query string. Essential for debugging queries, passing filters to other methods, and understanding what your query actually contains.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-getencodedquery",
      "updatedAt": "2026-03-09T03:25:11Z"
    },
    {
      "className": "GlideRecord",
      "method": "getRecordClassName",
      "signature": "getRecordClassName()",
      "returnType": "string",
      "parameters": [],
      "summary": "Returns the actual table name of the current record, different from getTableName() when working with extended tables. Essential for polymorphic queries.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-getrecordclassname",
      "updatedAt": "2026-03-09T03:25:12Z"
    },
    {
      "className": "GlideRecord",
      "method": "getRefRecord",
      "signature": "gr.fieldName.getRefRecord()",
      "returnType": "GlideRecord",
      "parameters": [],
      "summary": "Get the referenced GlideRecord from a reference field without a second query. Essential method for efficient reference field data access in ServiceNow.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-getrefrecord",
      "updatedAt": "2026-03-09T03:25:13Z"
    },
    {
      "className": "GlideRecord",
      "method": "getRowCount",
      "signature": "getRowCount()",
      "returnType": "number",
      "parameters": [],
      "summary": "Returns the number of records in a GlideRecord result set. Runs the full query to count rows. Use GlideAggregate for better performance on count-only operations.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-getrowcount",
      "updatedAt": "2026-03-09T03:25:14Z"
    },
    {
      "className": "GlideRecord",
      "method": "getTableName",
      "signature": "getTableName()",
      "returnType": "string",
      "parameters": [],
      "summary": "Returns the table name a GlideRecord was instantiated against. Essential for debugging and dynamic table operations in ServiceNow server-side scripts.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-gettablename",
      "updatedAt": "2026-03-09T03:25:15Z"
    },
    {
      "className": "GlideRecord",
      "method": "getUniqueValue",
      "signature": "getUniqueValue()",
      "returnType": "string",
      "parameters": [],
      "summary": "Returns the sys_id of the current GlideRecord. More readable than getValue('sys_id'). Essential for record lookups and relationship building in ServiceNow.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-getuniquevalue",
      "updatedAt": "2026-03-09T03:25:16Z"
    },
    {
      "className": "GlideRecord",
      "method": "getValue",
      "signature": "getValue(fieldName)",
      "returnType": "string",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The API name of the field to retrieve. Must be a valid field on the current table or extended table. Returns null if the field doesn't exist or you lack read access."
        }
      ],
      "summary": "Returns the internal value of a field as a string. For reference fields returns sys_id. Always returns string type even for integers and booleans.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-getvalue",
      "updatedAt": "2026-03-09T03:25:17Z"
    },
    {
      "className": "GlideRecord",
      "method": "hasNext",
      "signature": "hasNext()",
      "returnType": "boolean",
      "parameters": [],
      "summary": "Check if more records exist in your GlideRecord query without advancing the cursor. Returns boolean. Server-side only. Rarely needed — prefer next() instead.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-hasnext",
      "updatedAt": "2026-03-09T03:25:18Z"
    },
    {
      "className": "GlideRecord",
      "method": "initialize",
      "signature": "initialize()",
      "returnType": "void",
      "parameters": [],
      "summary": "Resets GlideRecord for new inserts by clearing all field values. Essential for reusing GlideRecord objects in loops to prevent data carryover between iterations.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-initialize",
      "updatedAt": "2026-03-09T03:25:19Z"
    },
    {
      "className": "GlideRecord",
      "method": "insert",
      "signature": "insert()",
      "returnType": "string",
      "parameters": [],
      "summary": "Creates a new record in the database and returns its sys_id. Triggers Business Rules and ACL checks. Essential for programmatic record creation.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-insert",
      "updatedAt": "2026-03-09T03:25:20Z"
    },
    {
      "className": "GlideRecord",
      "method": "isNewRecord",
      "signature": "isNewRecord()",
      "returnType": "boolean",
      "parameters": [],
      "summary": "Returns true if the GlideRecord hasn't been saved to the database yet. Essential for distinguishing insert vs update operations in Business Rules.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-isnewrecord",
      "updatedAt": "2026-03-09T03:25:22Z"
    },
    {
      "className": "GlideRecord",
      "method": "isValid",
      "signature": "isValid()",
      "returnType": "boolean",
      "parameters": [],
      "summary": "Returns true if the GlideRecord was instantiated against a valid table. Essential validation check—doesn't mean records exist, just that the table does.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-isvalid",
      "updatedAt": "2026-03-09T03:25:23Z"
    },
    {
      "className": "GlideRecord",
      "method": "isValidField",
      "signature": "isValidField(fieldName)",
      "returnType": "boolean",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The name of the field to check for existence on the table. This is case-sensitive and must match the exact field name as defined in the dictionary. Reference fields should be checked using their base name (e.g., 'caller_id' not 'caller_id.name')."
        }
      ],
      "summary": "Check if a field exists on a GlideRecord table before accessing it. Essential for dynamic field access across scopes and table versions in ServiceNow.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-isvalidfield",
      "updatedAt": "2026-03-09T03:25:24Z"
    },
    {
      "className": "GlideRecord",
      "method": "next",
      "signature": "next()",
      "returnType": "boolean",
      "parameters": [],
      "summary": "Moves the GlideRecord cursor to the next record in the result set. Returns true if a record exists, false when no more records. Essential for iteration.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-next",
      "updatedAt": "2026-03-09T03:25:25Z"
    },
    {
      "className": "GlideRecord",
      "method": "orderBy",
      "signature": "orderBy(fieldName)",
      "returnType": "void",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The field name to sort by, using the database column name (not display value). Supports dot-walking for reference fields like 'caller_id.name'. Case-sensitive and must be a valid field on the table."
        }
      ],
      "summary": "Sort GlideRecord query results in ascending order by field name. Essential for consistent data ordering in ServiceNow server-side scripts.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-orderby",
      "updatedAt": "2026-03-09T03:25:26Z"
    },
    {
      "className": "GlideRecord",
      "method": "orderByDesc",
      "signature": "orderByDesc(fieldName)",
      "returnType": "void",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The field name to sort by in descending order. Must be a valid field on the table being queried. Supports dot-walking to reference fields on related tables."
        }
      ],
      "summary": "Sort GlideRecord query results in descending order by field. Essential for displaying newest records first in ServiceNow server-side scripts.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-orderbydesc",
      "updatedAt": "2026-03-09T03:25:27Z"
    },
    {
      "className": "GlideRecord",
      "method": "query",
      "signature": "query()",
      "returnType": "void",
      "parameters": [],
      "summary": "Executes the GlideRecord database query. Required before next() iteration. No-op in before Business Rules. Essential reference for ServiceNow developers.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-query",
      "updatedAt": "2026-03-09T03:25:28Z"
    },
    {
      "className": "GlideRecord",
      "method": "setAbortAction",
      "signature": "setAbortAction(b)",
      "returnType": "void",
      "parameters": [
        {
          "name": "b",
          "type": "boolean",
          "required": true,
          "description": "Set to true to cancel the database operation, false to allow it. Most validation logic uses setAbortAction(true) when validation fails. The parameter is required despite what some documentation suggests."
        }
      ],
      "summary": "Cancel database operations in Business Rules with setAbortAction(). The standard way to validate data and block saves before they hit the database.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-setabortaction",
      "updatedAt": "2026-03-09T03:25:29Z"
    },
    {
      "className": "GlideRecord",
      "method": "setDisplayValue",
      "signature": "setDisplayValue(fieldName, value)",
      "returnType": "void",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The name of the field to set. Must be a valid field on the table. Works with any field type but most useful for reference fields."
        },
        {
          "name": "value",
          "type": "string",
          "required": true,
          "description": "The display value to set. For reference fields, this should match the display field of the referenced table. ServiceNow will resolve this to the appropriate sys_id on save."
        }
      ],
      "summary": "Sets a GlideRecord field by display value instead of sys_id. ServiceNow resolves display names to internal values on save. Perfect for reference fields.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-setdisplayvalue",
      "updatedAt": "2026-03-09T03:25:30Z"
    },
    {
      "className": "GlideRecord",
      "method": "setLimit",
      "signature": "setLimit(maxNumRecords)",
      "returnType": "void",
      "parameters": [
        {
          "name": "maxNumRecords",
          "type": "number",
          "required": true,
          "description": "The maximum number of records to return from the query. Must be a positive integer. Passing 0, negative numbers, or non-numeric values will be ignored and the query will return all matching records."
        }
      ],
      "summary": "Limits the number of records returned by a GlideRecord query. Must be called before query(). Critical for performance when you only need first N records.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-setlimit",
      "updatedAt": "2026-03-09T03:25:32Z"
    },
    {
      "className": "GlideRecord",
      "method": "setValue",
      "signature": "setValue(fieldName, value)",
      "returnType": "void",
      "parameters": [
        {
          "name": "fieldName",
          "type": "string",
          "required": true,
          "description": "The API name of the field to set. Must match the exact field name from the dictionary, not the display label. Case sensitive."
        },
        {
          "name": "value",
          "type": "string | number | boolean",
          "required": true,
          "description": "The value to assign to the field. For reference fields, pass the sys_id as a string. ServiceNow handles type conversion automatically based on the field type."
        }
      ],
      "summary": "Sets field values in memory for GlideRecord objects. Does not save to database until update() or insert() is called. Essential for data manipulation.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-setvalue",
      "updatedAt": "2026-03-09T03:25:33Z"
    },
    {
      "className": "GlideRecord",
      "method": "setWorkflow",
      "signature": "setWorkflow(enable)",
      "returnType": "void",
      "parameters": [
        {
          "name": "enable",
          "type": "boolean",
          "required": true,
          "description": "Whether to enable Business Rule execution for this GlideRecord instance. Pass false to suppress Business Rules, true to enable them. Defaults to true when not explicitly set."
        }
      ],
      "summary": "Control Business Rule execution during GlideRecord operations. Pass false to suppress workflows for data migrations and bulk updates. Server-side only.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-setworkflow",
      "updatedAt": "2026-03-09T03:25:34Z"
    },
    {
      "className": "GlideRecord",
      "method": "update",
      "signature": "update(reason)",
      "returnType": "string",
      "parameters": [
        {
          "name": "reason",
          "type": "string",
          "required": false,
          "description": "Optional audit comment that appears in the record's history. Gets written to sys_audit_relation table for compliance tracking. Commonly used for automated updates to document the business logic that triggered the change."
        }
      ],
      "summary": "Updates the current GlideRecord and returns sys_id or null. Triggers Business Rules, writes audit history, requires valid record state.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-update",
      "updatedAt": "2026-03-09T03:25:35Z"
    },
    {
      "className": "GlideRecord",
      "method": "updateMultiple",
      "signature": "updateMultiple()",
      "returnType": "void",
      "parameters": [],
      "summary": "Bulk update all matching records efficiently without Business Rules. Critical for performance on large datasets. Bypasses ACL checks and audit.",
      "url": "https://thesnowball.co/api/gliderecord/gliderecord-updatemultiple",
      "updatedAt": "2026-03-09T03:25:36Z"
    },
    {
      "className": "GlideSystem",
      "method": "addErrorMessage",
      "signature": "gs.addErrorMessage(message)",
      "returnType": "void",
      "parameters": [
        {
          "name": "message",
          "type": "string",
          "required": true,
          "description": "The error message text to display in the red banner. HTML tags are stripped for security. ServiceNow automatically escapes special characters to prevent XSS attacks."
        }
      ],
      "summary": "Display red error banners to users in ServiceNow. Does not prevent saves - combine with setAbortAction(true) to block operations. Server-side only.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-adderrormessage",
      "updatedAt": "2026-03-09T03:25:37Z"
    },
    {
      "className": "GlideSystem",
      "method": "addInfoMessage",
      "signature": "gs.addInfoMessage(message)",
      "returnType": "void",
      "parameters": [
        {
          "name": "message",
          "type": "string",
          "required": true,
          "description": "The text to display in the blue info banner. HTML is escaped automatically for security. Empty strings and null values display nothing without error."
        }
      ],
      "summary": "Display blue info messages to users with gs.addInfoMessage(). Server-side only. Shows after Business Rules complete. Essential for user feedback.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-addinfomessage",
      "updatedAt": "2026-03-09T03:25:38Z"
    },
    {
      "className": "GlideSystem",
      "method": "error",
      "signature": "gs.error(message, parameters)",
      "returnType": "void",
      "parameters": [
        {
          "name": "message",
          "type": "string",
          "required": true,
          "description": "The error message to log. Can contain placeholders like {0}, {1} for parameter substitution. HTML and special characters are automatically escaped when logged."
        },
        {
          "name": "parameters",
          "type": "any",
          "required": false,
          "description": "Optional parameter(s) to substitute into the message placeholders. Can be a single value or comma-separated values. Objects are converted to strings using their toString() method."
        }
      ],
      "summary": "Logs messages at ERROR level in ServiceNow. Use for unexpected failures that need alerting. Doesn't throw exceptions, just logs to system logs.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-error",
      "updatedAt": "2026-03-09T03:25:39Z"
    },
    {
      "className": "GlideSystem",
      "method": "generateGUID",
      "signature": "gs.generateGUID()",
      "returnType": "string",
      "parameters": [],
      "summary": "Generate a 32-character GUID string without hyphens for unique identifiers outside database inserts. Returns random string using platform entropy.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-generateguid",
      "updatedAt": "2026-03-09T03:25:40Z"
    },
    {
      "className": "GlideSystem",
      "method": "getCurrentScopeName",
      "signature": "gs.getCurrentScopeName()",
      "returnType": "string",
      "parameters": [],
      "summary": "Returns the current application scope name ('global' for global scope). Essential for building scope-aware scripts that behave differently per application.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-getcurrentscopename",
      "updatedAt": "2026-03-09T03:25:41Z"
    },
    {
      "className": "GlideSystem",
      "method": "getProperty",
      "signature": "gs.getProperty(key, defaultValue)",
      "returnType": "string",
      "parameters": [
        {
          "name": "key",
          "type": "string",
          "required": true,
          "description": "The name of the system property to retrieve from the sys_properties table. Case-sensitive and must match exactly. Property names typically use dot notation like 'glide.servlet.max_filename_length'."
        },
        {
          "name": "defaultValue",
          "type": "string",
          "required": false,
          "description": "The value to return if the property doesn't exist or has no value. Optional parameter that prevents null returns when properties are missing or empty."
        }
      ],
      "summary": "Retrieves system property values from sys_properties table. Always returns string. Use for configurable values instead of hardcoding in Business Rules and Script Includes.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-getproperty",
      "updatedAt": "2026-03-09T03:25:42Z"
    },
    {
      "className": "GlideSystem",
      "method": "getSession",
      "signature": "gs.getSession()",
      "returnType": "GlideSession",
      "parameters": [],
      "summary": "Returns the current GlideSession object to access session data, timezone, language settings, and client information in server-side scripts.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-getsession",
      "updatedAt": "2026-03-09T03:25:43Z"
    },
    {
      "className": "GlideSystem",
      "method": "getUser",
      "signature": "gs.getUser()",
      "returnType": "GlideUser",
      "parameters": [],
      "summary": "Get the current session user as a GlideUser object to access name, email, department, manager, and roles. Server-side only. Essential for user context.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-getuser",
      "updatedAt": "2026-03-09T03:25:44Z"
    },
    {
      "className": "GlideSystem",
      "method": "getUserID",
      "signature": "gs.getUserID()",
      "returnType": "string",
      "parameters": [],
      "summary": "Get the sys_id of the currently logged-in user. The foundation for user-scoped queries and security checks in ServiceNow server-side scripts.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-getuserid",
      "updatedAt": "2026-03-09T03:25:45Z"
    },
    {
      "className": "GlideSystem",
      "method": "getUserName",
      "signature": "gs.getUserName()",
      "returnType": "string",
      "parameters": [],
      "summary": "Returns the user_name (login ID) of the current user. Essential for logging, audit trails, and user-specific logic in server-side scripts.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-getusername",
      "updatedAt": "2026-03-09T03:25:46Z"
    },
    {
      "className": "GlideSystem",
      "method": "hasRole",
      "signature": "gs.hasRole(role)",
      "returnType": "boolean",
      "parameters": [
        {
          "name": "role",
          "type": "string",
          "required": true,
          "description": "The name of the role to check. This is the role name, not the display name or sys_id. Case-sensitive string that must exactly match the role record's name field."
        }
      ],
      "summary": "Check if the current user has a specific role in ServiceNow. Returns true for role members and admin users. Essential for access control in scripts.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-hasrole",
      "updatedAt": "2026-03-09T03:25:47Z"
    },
    {
      "className": "GlideSystem",
      "method": "include",
      "signature": "gs.include(name)",
      "returnType": "boolean",
      "parameters": [
        {
          "name": "name",
          "type": "string",
          "required": true,
          "description": "The name of the Script Include to load. Must match exactly the Name field of the Script Include record, case-sensitive. Cannot include file extensions or paths."
        }
      ],
      "summary": "Load Script Includes dynamically into global scope with gs.include(). Server-side only method for runtime loading. Essential for legacy global scripts.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-include",
      "updatedAt": "2026-03-09T03:25:48Z"
    },
    {
      "className": "GlideSystem",
      "method": "info",
      "signature": "gs.info(message, parameters)",
      "returnType": "void",
      "parameters": [
        {
          "name": "message",
          "type": "string",
          "required": true,
          "description": "The log message to write. Supports substitution tokens like {0}, {1}, etc. that will be replaced with values from the parameters array. Maximum length is 8192 characters before truncation."
        },
        {
          "name": "parameters",
          "type": "any",
          "required": false,
          "description": "Variable number of arguments to substitute into the message string. Values are converted to strings using JavaScript's toString() method. Objects are serialized as JSON when possible."
        }
      ],
      "summary": "Log messages at INFO level with string substitution. Preferred over gs.log() in scoped apps. Server-side only method for debugging and auditing.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-info",
      "updatedAt": "2026-03-09T03:25:49Z"
    },
    {
      "className": "GlideSystem",
      "method": "isInteractive",
      "signature": "gs.isInteractive()",
      "returnType": "boolean",
      "parameters": [],
      "summary": "Returns true for user-driven UI requests, false for background jobs and API calls. Essential for conditional logic in Business Rules and Script Includes.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-isinteractive",
      "updatedAt": "2026-03-09T03:25:51Z"
    },
    {
      "className": "GlideSystem",
      "method": "log",
      "signature": "gs.log(message, source)",
      "returnType": "void",
      "parameters": [
        {
          "name": "message",
          "type": "string",
          "required": true,
          "description": "The message to write to the system log. Can be any string value including variables and concatenated text. Gets converted to string if you pass other types."
        },
        {
          "name": "source",
          "type": "string",
          "required": false,
          "description": "Optional label identifying where the log message originated. Appears in the Source column in System Logs > All. Defaults to empty string if not provided."
        }
      ],
      "summary": "Write messages to ServiceNow's system log table. Essential for debugging server-side scripts. View logs in System Logs > All.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-log",
      "updatedAt": "2026-03-09T03:25:51Z"
    },
    {
      "className": "GlideSystem",
      "method": "nowDateTime",
      "signature": "gs.nowDateTime()",
      "returnType": "string",
      "parameters": [],
      "summary": "Returns current date and time as string in instance timezone. Essential for logging, timestamps, and date comparisons in server-side scripts.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-nowdatetime",
      "updatedAt": "2026-03-09T03:25:53Z"
    },
    {
      "className": "GlideSystem",
      "method": "setProperty",
      "signature": "gs.setProperty(key, value, description)",
      "returnType": "void",
      "parameters": [
        {
          "name": "key",
          "type": "string",
          "required": true,
          "description": "The system property name. Must be unique across the instance. If the property already exists, its value and description will be updated."
        },
        {
          "name": "value",
          "type": "string",
          "required": true,
          "description": "The property value to set. All values are stored as strings regardless of input type. Empty strings and null values are both stored as empty strings."
        },
        {
          "name": "description",
          "type": "string",
          "required": true,
          "description": "Human-readable description of the property's purpose. Appears in the System Properties table and helps administrators understand the property's function."
        }
      ],
      "summary": "Creates or updates ServiceNow system properties programmatically. Use sparingly — most property changes belong in the UI, not code.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-setproperty",
      "updatedAt": "2026-03-09T03:25:54Z"
    },
    {
      "className": "GlideSystem",
      "method": "tableExists",
      "signature": "gs.tableExists(name)",
      "returnType": "boolean",
      "parameters": [
        {
          "name": "name",
          "type": "string",
          "required": true,
          "description": "The table name to check for existence. Can be a standard table like 'incident' or an extended table like 'u_custom_table'. Case-sensitive and must match the exact table name in the dictionary."
        }
      ],
      "summary": "Check if a ServiceNow table exists before querying it. Essential for dynamic code that handles optional plugins or scoped applications.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-tableexists",
      "updatedAt": "2026-03-09T03:25:55Z"
    },
    {
      "className": "GlideSystem",
      "method": "warn",
      "signature": "gs.warn(message, parameters)",
      "returnType": "void",
      "parameters": [
        {
          "name": "message",
          "type": "string",
          "required": true,
          "description": "The warning message to log, supporting parameter substitution using {0}, {1}, etc. placeholders. Can be plain text or contain substitution markers for dynamic content."
        },
        {
          "name": "parameters",
          "type": "object | string | number",
          "required": false,
          "description": "Values to substitute into the message placeholders. Can be a single value or array of values. Undefined or null parameters are converted to empty strings in the output."
        }
      ],
      "summary": "Log warning messages with parameter substitution using gs.warn(). Essential for non-fatal issues that need investigation in ServiceNow server-side scripts.",
      "url": "https://thesnowball.co/api/glidesystem/glidesystem-warn",
      "updatedAt": "2026-03-09T03:25:56Z"
    },
    {
      "className": "GlideUser",
      "method": "getID",
      "signature": "gs.getUser().getID()",
      "returnType": "string",
      "parameters": [],
      "summary": "Get the sys_id of the current user from a GlideUser object. Alternative to gs.getUserID() when working with user objects in server-side scripts.",
      "url": "https://thesnowball.co/api/glideuser/glideuser-getid",
      "updatedAt": "2026-03-09T03:25:57Z"
    }
  ]
}