- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2018 11:39 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2018 11:45 PM
getReference() is build-in AJAX to get GlideRecord that your reference field references.
Here is an example (with callback function):
function onChange(control, oldValue, newValue, isLoading) {
if(newValue) {
var caller = g_form.getReference('caller_id',doAlert);
}
}
function doAlert(caller){
if(caller.email == ''){
alert ('This user does not have email');
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2018 11:43 PM
Hi,
Go through the following link :
What is difference between GLIDE AJAX Call and getReference() call In client script.
Mark if helpful/Correct
Thanks
Ajay

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2018 11:45 PM
getReference() is build-in AJAX to get GlideRecord that your reference field references.
Here is an example (with callback function):
function onChange(control, oldValue, newValue, isLoading) {
if(newValue) {
var caller = g_form.getReference('caller_id',doAlert);
}
}
function doAlert(caller){
if(caller.email == ''){
alert ('This user does not have email');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2018 11:47 PM
Hello ,
It depends on performance of client.
If you're using getReference you will get ALL data for each record you "get" whether you need it or not.
If you're using GlideAjax you only get what you need, because you will explicitly return the exact information you need and nothing else.
Please go through this link :https://snprotips.com/blog/2016/2/6/gliderecord-client-side-vs-server-side
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Sagar Tajane