- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2025 10:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2025 11:00 PM
Hello @redijanirud ,
This is the official documentation which you can refer to
https://developer.servicenow.com/dev.do#!/learn/learning-plans/xanadu/new_to_servicenow/app_store_le...
https://www.servicenow.com/docs/bundle/yokohama-api-reference/page/app-store/dev_portal/API_referenc...
Please mark this as "correct" and "helpful" if you feel this answer helped you in anyway.
Thanks and Regards,
Ved
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2025 11:02 PM
Hi @redijanirud
Check the ServiceNow article below, which provides an explanation..
GlideRecord
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2025 11:04 PM
Hi @redijanirud
Please refer :
In ServiceNow, a GlideRecord is a special JavaScript class used to interact with the database. It allows you to query, update, insert, or delete records in any table in ServiceNow, similar to how you would use SQL in traditional databases.
Simple Real-Time Example :
Let’s say you work in IT support and want to find all open incidents assigned to you.
You want to get all incidents where:
- The state is not "Closed"
- Assigned to your user ID
GlideRecord Script:
var gr = new GlideRecord('incident'); // Targeting the 'incident' table
gr.addQuery('state', '!=', '7'); // State not equal to 'Closed' (state 7 = Closed)
gr.addQuery('assigned_to', gs.getUserID()); // Assigned to current user
gr.query(); // Run the query
while (gr.next()) {
gs.info('Incident Number: ' + gr.number); // Print incident number
}
Imagine you're an Infra Dev Specialist and want to automate a script that checks for stale incidents (e.g., not updated in 7 days). GlideRecord helps you fetch those records and take action—like sending reminders or escalating.
Help future readers out—mark the answer and close the thread if it helped you! 😊
If this response resolved your issue, kindly mark it as Helpful or Accept Solution—it helps others find the answer faster.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2025 11:08 PM
Hi @redijanirud
GlideRecord is a powerful API that allows you to perform CRUD (Create, Read, Update, and Delete) operations on ServiceNow tables. You can use GlideRecord to query, insert, update, and delete records in any ServiceNow table.
Check these articles for better understanding:
GlideRecord | ServiceNow Developers
Cheat Sheet for GlideRecord Queries - ServiceNow Community
If my response solves your query, please marked helpful by selecting Accept as Solution and Helpful. Let me know if anything else is required.
Thanks,
Prerna