
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
02-12-2020 11:38 AM - edited 11-18-2023 06:16 PM
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.
-
The GlideAjax class allows a client-side script to make an AJAX call to the server, execute a server-side Script Include, and even return a value. GlideAjax might be one of the least well understood client-side APIs in ServiceNow, in part because it has both a client-side, and a server-side component.
-
GlideAjax class allows the execution of server-side code from the client. GlideAjax calls pass parameters to the script includes, and, using naming conventions, allows the use of these parameters.
- if you want to call GlideRecord in client scripts use GlideAjax to reduce perfomance issue.
- use GlideAjax to perform an asynchronous call to the database that keeps your user’s browser running.
- Using GlideAjax / Glideajax: Return multiple values using Json
- How to use GlideAjax and Client Scripts with Best Practice in mind by Göran Lundqvist
- GlideAjax / asynchronous / synchronous
- Client Scripting Technical Best Practices Overview / Old Wiki
- Identifying and reducing synchronous AJAX calls generated by client scripts
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.
- 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.
- server script best practices By Jake Gillespie
- Performance Best Practice for Efficient Queries - Top 10 Practices
- 7,256 Views