how to display simple alert pop up mesage with ok button on record producer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2020 02:05 AM
HI all,
I want to display a pop up message with ok button if any feedback is pending while raising new incident. Please help
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2020 02:17 AM
I want to display pop up on Page load with ok and cancel button on record producer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2020 02:17 AM
Hi shilpi ,
try on submit catalog client script :
function onSubmit() {
//Type appropriate comment here, and begin script below
if(condition if any feedback pending)
{
alert("alert message");
}
}
Mark my answer correct helpful based on impact .
Regards,
Apeksha

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2020 03:09 AM
Hi,
To achieve your use case use Confirm Box.
You can simply write OnLoad() client script if you want confirm box on form load and write some condition in it as per your requirement. You can also use this in Onchange() and OnSubmit() Client script. Based on you action (Ok or Cancel)in confirm box it would go further.
Refer this below code i have done this.
function onLoad()
var confirm_box = confirm("Confirm Box"); //this will give you a confirm box
if(confirm_box == true)//if we select Ok in confirm box
{
//do some stuff here
g_form.setDiasplay('field_name','boolean value');
g_form.setMandatory('field_name','boolean value');
}
else
{
//do some stuff here
}
}
And you can also use this based on your condition refer below link this it will help you more.//www.servicenowguru.com/scripting/client-scripts-scripting/javascript-popup-boxes-servicenow/
Please Mark Correct Answer if it help you in any way.
Thanks and Regards,
Kunal.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2020 11:09 AM
any update on this.
if you get your issue resolve then marking this thread as correct so that this thread useful to others.
Thanks,
Kunal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022 12:28 AM
for cancel i need to keep old value for that its not working