Skip to content

Instantly share code, notes, and snippets.

@nancystodd
Forked from animyeboah/servicenow-scripting.md
Created October 24, 2019 00:40
Show Gist options
  • Save nancystodd/84a3628ac652a67d93f637cea0eb5c5f to your computer and use it in GitHub Desktop.
Save nancystodd/84a3628ac652a67d93f637cea0eb5c5f 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