What is the use of getReference()?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2018 08:34 AM
What is the use of getReference()?
- 137,073 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2025 01:06 AM
getReference() is used to fetch the full GlideRecord of a reference field.
For example, if you have a reference field like Caller (caller_id) on an Incident:
g_form.getValue('caller_id') → only returns the sys_id.
g_form.getReference('caller_id', function(caller) { ... }) → returns the full user record so you can access fields like caller.name, caller.email, etc.
This is useful when you need additional details of the referenced record in client scripts.
Regards,
Pranita D
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2025 02:09 AM
getReference() is used to fetch the full GlideRecord of a reference field.
For example, if you have a reference field like Caller (caller_id) on an Incident:
g_form.getValue('caller_id') → only returns the sys_id.
g_form.getReference('caller_id', function(caller) { ... }) → returns the full user record so you can access fields like caller.name, caller.email, etc.
This is useful when you need additional details of the referenced record in client scripts.
