- 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 12:44 AM
If you want a pop up like the you can use JavaScript code like below on a on change client script .
alert('test');
or
confirm("Press a button!");
Regards
Pranav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 12:55 AM
Thank you for your reply but can please guide me with the whole code and process because I'm new to ServiceNow

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 01:01 AM
Goto the incident form then goto configure>Client Scripts
Create a new On change client script and set the field to category and then add the code .
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if ( newValue == '') {
return;
}
if(newValue == 'hardware') // add the category value of your choice
{
alert('test');
}
}
Reference Links
https://developer.servicenow.com/dev.do#!/learn/learning-plans/orlando/servicenow_administrator/app_store_learnv2_scripting_orlando_exercise_create_client_scripts
https://www.basicoservicenowlearning.in/2019/12/client-script-in-servicenow.html
https://docs.servicenow.com/bundle/paris-application-development/page/script/client-scripts/concept/client-side-scripting-overview.html
Regards
Pranav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 01:38 AM
Hello,
Yes that it is generating an alert but i want user clickable 'OK' button on the alert message along with the text