In ServiceNow, GlideForm is the client-side API used to interact with and manipulate a record form, including reading and writing field values, controlling visibility/mandatory/read-only behavior, and displaying messages to the user. The platform exposes GlideForm methods through a single global client-side object named g_form. ServiceNow documentation explicitly states that there is no constructor for the GlideForm class and that developers access GlideForm methods using the g_form global object available in client-side contexts such as Client Scripts and UI Policies. This makes g_form the correct and standard way to call GlideForm functions (for example, g_form.getValue(), g_form.setValue(), g_form.setDisplay(), etc.). The other options listed are not the documented GlideForm global object for standard client scripting in ServiceNow.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit