Cannot use getReference method on client script , Glide ajax is the other way
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2022 10:05 AM
Hi
Facing one challenge to use getReference method on client script. I know the other way is to use Glide ajax call.
But I have a display business rule and have a g_scratchpad variable.
I am having reference field "abc" on a table on which my onLoad client script is written and this "abc" field refers to other field that is having a manager field. I want the value of this manager field and needs to compare this with my g_scratchpad variable.
Pls let me know how can I use this on my client script instead of getRefernce. If Glide ajax is the way so pls provide me the logic and script for reference , how can I call my display BR on client script.
Thanks
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2022 07:15 PM
Then use display BR and store the manager in scratchpad and use it in onLoad client script
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2022 03:14 AM
Yes Ankur , I have created the display BR and stored the manager value in the scratchpad
but how can I use this on the onload client script . I cannot use the getRefernce method on client script because the tool doesn't allow. Any other way can you suggest.
pls let me know the logic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2022 03:22 AM
Hi,
you can use g_scratchpad variable value in client script and check that
can you share your both the scripts? BR and client script
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2022 04:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2022 04:32 AM
Hi,
can you share the script as well
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader