Skip to content

Instantly share code, notes, and snippets.

@iamwill
Last active October 24, 2025 05:43
Show Gist options
  • Save iamwill/b545331f2934d6239ba2b85f3c1cf9ec to your computer and use it in GitHub Desktop.
Save iamwill/b545331f2934d6239ba2b85f3c1cf9ec to your computer and use it in GitHub Desktop.
GlideRecord cheatsheet

GlideRecord Cheat Sheet

var gr = new GlideRecord('incident');

Is Valid?

.isValid() Check if current table is valid

.isEncodedQueryValid(String queryString) Check if queryString is valid

.isValidField(String columnName) Check if columnName is valid

.isValidRecord() Check if current record is valid

addQuery operators

Operator type description
= number equals
!= number not equal
> number greater than
>= number greater than or equal

From:

https://developer.servicenow.com/app.do#!/api_doc?v=madrid&id=c_GlideRecordScopedAPI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment