ServiceNow introduction to getReference | ServiceNow getreference with callback function
Hi All,
I hope you're doing great.
In today's tutorial, we will be looking into one of the most important client-side functions which is getReference.
In this tutorial, we will try to understand in depth what is ServiceNow getRefecrence client-side function is.
Titles of the tutorials
1. What are ServiceNow Client-side APIs2. What is ServiceNow getRefecrence function3. What are the best practices to use the getReferecnce function4. What are the advantages of the ServiceNow getReference function
5. Use case demo
Before we jump into the tutorial let's try to understand what is ServiceNow getReference function
- GlideForm - getReference(String fieldName, Function callBack)
Returns the GlideRecord for a specified field. - If a callback function is present, this routine runs asynchronously. The browser (and script) processing continues normally until the server returns the reference value, at which time, the callback function is invoked. If a callback function is not present, this routine runs synchronously and processing halts (causing the browser to appear to hang) while waiting on the server response.
- Important: It is strongly recommended that you use a callback function.
- Callback function support for ServiceCatalogForm.getReference is available.
Please be sure to bookmark this article as well as mark it as Helpful if you thought it was helpful.
Regards,
Amit Gujarathi
https://www.servicenow.com/community/developer-articles/servicenow-introduction-to-getreference-servicenow-getreference/ta-p/2373702
