Glide Record.

redijanirud
Giga Contributor

What is a glide record in servicenow?

3 ACCEPTED SOLUTIONS

VedS
Mega Guru

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

View solution in original post

J Siva
Tera Sage

Hi @redijanirud 
Check the ServiceNow article below, which provides an explanation..
GlideRecord

Regards,
Siva

View solution in original post

Pooja Limbani
Giga Guru

Hi @redijanirud 

Please refer :

https://developer.servicenow.com/dev.do#!/learn/learning-plans/xanadu/new_to_servicenow/app_store_le...

 

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.

View solution in original post

5 REPLIES 5

prerna_sh
Mega Sage

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