Client side APIs are available within the browser, and load with the ServiceNow page. Let's go over some of the client side APIs that are available:
- g_form (a reference to the GlideForm object) allows you to access, set, and get values from form elements and fields. This object has methods to add field messages, set whether fields are mandatory, visible, or read-only, and so on.
- g_user (a reference to the GlideUser object) has methods that allow you to check if the current user (the logged-in user who's loaded the page on which the script is running) has a given role, and contains properties that give you access to the user's name and ID.
- g_list (a reference to the GlideList2 or GlideListV3 object, depending on what list ...