Skip to content

Instantly share code, notes, and snippets.

@animyeboah
Last active October 24, 2019 00:40
Show Gist options
  • Save animyeboah/dc10ce7daabc063285ce3f0a2138c450 to your computer and use it in GitHub Desktop.
Save animyeboah/dc10ce7daabc063285ce3f0a2138c450 to your computer and use it in GitHub Desktop.
ServiceNow Developer Best Practices

GlideRecord

  • Use getUniqueValue to get sys_id.
  • Use newRecord instead of instantiating to get a new record with default values.
  • Dot-walking on GlideRecord returns GlideElement, use getRefRecord to get GlideRecord.

GlideForm

  • Use getBooleanValue for boolean fields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment