- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 12:41 AM
Hello,
we have one record producer named as "Report an Issue" , Upon selection of "category" in "report an issue" record producer pop up is coming to display that you are raising issue for "name of the service" service and have a user clickable option "Ok".
Could you please help me on this
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 03:38 AM
Hi,
there is another checkbox on Catalog Client Script:
Applies on Target Record
If you select this checkbox then it would run on the form as well
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
11-10-2020 08:28 AM
Hi,
it should work
Did you try adding alert and check after line number 4 to check onchange triggers?
how are you testing it?
are you changing the category variable in the variable section of incident form right?
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
11-10-2020 10:45 PM
Hi Ankur it working as expected and one thing confirmation box is visible while selecting the particular service but sysid is visible instead of service name.
I have tried by giving the script-- it is giving me an error as java script error in browser console
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if ( newValue == '') {
return;
}
if(newValue != '') // add the category value of your choice
{
var service =g_form.getDisplayBox('business_service').value;
confirm("you are raising issue for " + service +" service");
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 11:00 PM
Hi,
it should work fine if that field is on incident form
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
11-10-2020 11:07 PM
Hi yes the field is in incident even though it is not showing the name of the service and i have checked after typing the g_form some choices got displayed like get value , getmessage list of methods in that list aslo 'getDisplaybox' is available in that list aswell
i think becuase of this it is showing the javascript error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 11:23 PM
Hi,
the above client script will work when you change the category value
how are you testing?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader