As GlideRecord is on server side why GlideForm and GlideUser works on client side ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2025 10:14 PM
As Glide Record is on server side why Glide form and Glide User works on client side ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2025 10:21 PM - edited ‎06-16-2025 10:22 PM
Hi @harshshree7 ,
GlideRecord: GlideRecord is a special Java class (GlideRecord.java) that can be used in JavaScript exactly as if it was a native JavaScript class.
- is used for database operations instead of writing SQL queries.
- is an object that contains zero or more records from one table. Another way to say this is that a GlideRecord is an ordered list.
GlideUser in Client Script
The GlideUser API provides methods that access information about the current user and current user roles. Using this API avoids the need to use the slower GlideRecord queries to get user information.
GlideUser methods and properties are accessed through a global object (g_user) that is only available in client scripts.
- contains name and role information about the current user.
- is typically used in client scripts and UI policies but is also found in UI actions that run on the client.
- cannot be used in business rules or UI actions that run on the server.
Feature/Aspect GlideRecord GlideUser (g_user)Purpose Interact with database tables(GlideRecord) Access current user session details (GlideUser) Type Server-side API Client-side global object Scope Business Rules, Script Includes, Scheduled Jobs Client Scripts, UI Policies, Catalog Client Scripts Used For Querying, inserting, updating, deleting records Checking user roles, name, ID, and session info Returns GlideRecord object representing records User info as string or boolean Access to DB Yes No Example gr = new GlideRecord('incident'); g_user.hasRole('admin') Common Methods addQuery(), get(), next(), insert() hasRole(), getName(), getUserID() Context Backend operations and logic Frontend behavior control Security Needs appropriate roles to access tables Reflects current user’s session privileges Please mark my answer as helpful/correct if it resolves your query.
Regards,
Arun Manoj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2025 10:22 PM
Hi @harshshree7 ,
Sorry but it's not "why" on server side or client side.
That's the official instance recommended methods designated and defined to work for Server side and Client side respectively.
Sandeep Dutta
Please mark the answer correct & Helpful, if i could help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2025 10:22 PM
that's how ServiceNow has designed it.
GlideRecord does work in client side but has limited capabilities, not all GlideRecord methods which are supported in server side work in client side.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2025 10:24 PM
Hi,
There are a whole lot more APIs from ServiceNow that you can use. And they all have different purposes and functionality, and, as you mentioned, they are often used on different parts, as server-side or client-side.
For a complete reference, you can look here: Reference | ServiceNow Developers