- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2023 09:18 AM - edited 05-15-2023 09:19 AM
Hi All,
Thanks for checking my post.
We have reference qualifier in the incident form on a custom field service as :
javascript:new incidentServerUtils().getService(current.caller_id);
which triggers;
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2023 06:29 AM
Hi @Kaustubh k , To get the field value in Record producer, need to use variables.<Field/Variable Name>.
In your use case, It should work when you replace the "current.caller_id" to "current.variables.caller_id" in reference qualifier.
javascript:new incidentServerUtils().getService(current.variables.caller_id);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2023 01:25 PM
Hi @Kaustubh k ,
In your script, you are sending current.caller_id to the server side script as a parameter to script includes. This will work with form reference field Reference Qualifiers.
javascript: new incidentServerUtils().getService(current.caller_id);
But I have observed, this won't work to Reference fields in variables in Catalog Items. So as a workaround Instead of sending the parameter you can use the gs.getUserID() function in your script include.
Please mark my answer as helpful, if it helps you!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2023 05:24 AM
Hello @Mallidi Suma
Thanks for reviewing this, could you please help with the SI changes and also the ref qualifier to me modified on the field,which triggers the SI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2023 12:01 AM
Dear @Kaustubh k
You can use OnDemand Script Include to achieve your requirement.
For reference: Advanced Reference Qualifier Using a Script Include - ServiceNow Guru
- Kailas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2023 06:02 AM
the reference variable is referring to which table?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader