- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2017 02:39 AM
why it is not good to use GlideRecord in clientscript?
Solved! Go to Solution.
- Labels:
-
Personal Developer Instance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2017 02:43 AM
Client scripting(which runs on browser) uses either data available on the form or data retrieved from the database.
Use client data as much as possible to eliminate the need for time-consuming server lookups i.e. GlideRecord.
The best ways to get data into form/browser from the database are g_scratchpad, and asynchronous GlideAjax lookup.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2017 02:43 AM
Client scripting(which runs on browser) uses either data available on the form or data retrieved from the database.
Use client data as much as possible to eliminate the need for time-consuming server lookups i.e. GlideRecord.
The best ways to get data into form/browser from the database are g_scratchpad, and asynchronous GlideAjax lookup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2017 02:46 AM
From wiki:
Minimize Server Lookups
Client scripting uses either data available on the client or data retrieved from the server. Use client data as much as possible to eliminate the need for time-consuming server lookups. The top ways to get information from the server are g_scratchpad, and asynchronous GlideAjax lookup.
The primary difference between these methods is that g_scratchpad is sent once when a form is loaded (information is pushed from the server to the client), whereas GlideAjax is dynamically triggered when the client requests information from the server.
Other methods, GlideRecord and g_form.getReference() callback are also available for retrieving server information. However, these methods are no longer recommended due to their performance impact. Both methods retrieve all fields in the requested GlideRecord when most cases only require one field. The GlideRecord API is not available for scoped applications.