CLIENT SCRIPT
HOW-TO.
The four client-script tasks people actually search for — display values, reference field values, dot-walking limits, and debugging. Each guide opens with a direct answer, then numbered steps with copy-ready g_form and GlideAjax code.
Pick a task
- Guide 1Get the display value in a client scriptUse g_form.getDisplayBox('field').value or g_form.getDisplayValue('field') to read what the user sees, and getValue() for the sys_id — with copy-ready onChange code.Read guide →
- Guide 2Get a reference field value in a client scriptRead reference fields with g_form.getValue for the sys_id, getReference for the whole record, or GlideAjax for one field — with async callback code you can copy.Read guide →
- Guide 3Dot-walk in a client scriptg_form cannot dot-walk. Use getReference with a callback, GlideAjax, or a dot-walked form field to read caller_id.manager.email safely from the client.Read guide →
- Guide 4Debug a client scriptDebug client scripts with the browser console, debugger breakpoints, g_form.addInfoMessage, JS debugger logs and field messages — a repeatable checklist.Read guide →
Sibling clusters
Client scripts rarely stand alone — these hubs cover the server and automation halves of the same interview topics.