g_form.getReference() does not work in Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2022 07:04 AM
I have a catalog client script that does not work on the portal. g_form.getReference() needs to be configured to I assume a script include and a client script. This is what I need:
* I have a record Producer with 2 variable sets (requestor, short description + comments)
* I need the short description to auto-fill with the requester's information from that variable set.
* I have used the getReference and it worked, but the portal does not like that option
* I have the script bellow that works for the looped in user, but I need the Requester because that is dynamic. If I change the requester, the user in the short description does not get changed
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2022 07:14 AM
Hi,
you can use getReference() with callback method
OR
you can use GlideAjax
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-07-2022 07:15 AM
Hi,
If you'd like to change this to GlideAjax, please refer to the this GlideAjax cheat sheet for an example.
If you get stuck on a specific piece, please reply back here with a copy of the script you've worked on thus far and what issues that you're having. Please include any log statement results as well.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!