GlideRecord is a SERVER-SIDE API. It is not available in Client Scripts. To access server data from a client script, use GlideAjax to call a Script Include. Client Scripts run in the user's browser.
# Output: JSON to stdout with valid/warnings/errors. # Diagnostics: to stderr. # Exit code: 0 valid (no errors; warnings allowed), 1 validation errors found, 2 cannot run.