logo

NJP

what is the difference between the glide record and glide Ajax ?

Import · Feb 12, 2020 · article

what is the difference between the glide record and glide Ajax ?

GlideRecord serves as a go-to tool for handling server-side database operations, enabling seamless interaction with records in the ServiceNow platform. On the flip side, GlideAjax steps in for asynchronous server-side calls initiated directly from the client side, providing a mechanism for efficient and responsive data exchanges between the server and the user interface.

GlideAjax :

Purpose: GlideAjax serves a distinct purpose by facilitating asynchronous server-side calls initiated from the client side. This capability enables the invocation of server-side scripts without the need to refresh the entire page, providing a smoother user experience.

Usage: In practice, GlideAjax finds its primary application in client-side scripts, notably in components like UI Policies, UI Actions, and Client Scripts. These scripts leverage the asynchronous nature of GlideAjax to interact seamlessly with server-side functionalities, enhancing the overall interactivity and responsiveness of the user interface.

GlideRecord

In the expansive realm of ServiceNow, GlideRecord emerges as a pivotal JavaScript class designed for orchestrating database operations. Functioning as a versatile tool, it empowers developers to seamlessly engage with records within a table, enabling a spectrum of actions including queries, inserts, updates, and deletions. The potency of GlideRecord is harnessed predominantly in server-side scripting paradigms, finding its application in Business Rules, Script Includes, and UI Actions. This dynamic class underscores the robust database interaction capabilities offered by ServiceNow's scripting environment.

Purpose: GlideRecord stands as a versatile tool designed primarily for executing various operations on a database. This encompasses a wide range of actions like queries, inserts, updates, and deletes, all targeted at records within a specific table.

Usage: This powerful tool finds its application within server-side scripts, playing a pivotal role in mechanisms like Business Rules, Script Includes, and UI Actions. In these script-driven environments, GlideRecord takes center stage, facilitating seamless interactions with the underlying database.

Pradeep Sharma - what's the difference

image

Summary

Script summary

The best of Architects

Best Practice: Why using 'gr'

Performance Troubleshooting Guide

gliderecord-client-side-vs-server-side

View original source

https://www.servicenow.com/community/developer-articles/what-is-the-difference-between-the-glide-record-and-glide-ajax/ta-p/2323547