Efficiently transferring data to the client
Moving information from the instance to the browser is one of the most time consuming operations that you will need to do. The information you want could be many thousands of miles away, or it may take some time for the instance to process it. The users will not be impressed if their browser freezes while they wait.
We've already seen how the getReference
function of GlideForm allows you to pull data from the instance through a reference field. This retrieves all the fields of a single record. But, it doesn't give very much control over what is sent and received.
GlideAjax
is a technique that allows you to craft specific communication between the server and client, ensuring that only relevant data is transferred. Let's create a reusable way of grabbing the value of a single field of a record.
Note
Since GlideRecord
is not available to scoped apps, GlideAjax
is the only way to get data from the client. However, it is also recommended to use it in non...