Display Popup message with "Yes/No"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2020 01:04 AM
Hi All,
How can I display a popup message for confirmation with Yes/No buttons? And then based on the response, perform the respective operations?
I do not want to use below client script as it shows OK/Cancel button, instead show the popup form to display Yes/No or any other information.
var answer = confirm("Do you want to proceed");
if (!answer)
{
return false;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2020 01:11 AM
You could try downloading Sweet Alert from servicenow share
Alternatively you can use a GlideDialogWindow to open a UI page where you can configure what you want users to see.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2020 01:19 AM
Hi
You can use something like this also in the client script -
spModal.open({
title: 'Loading Modal',
message: "Testing the modal open from client script",
buttons: [
{label:'Ok', primary: true}
]
});
Hope this helps
Regards
Omkar Mone
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2020 01:37 AM
I copied your code in client script but it is not displaying anything.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2020 01:41 AM
spModal is available only in service portal client scripts.