need to display popup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
44m ago
Hi all
I have a requirement to display popup message with Yes and No button in workspace view. I used the following code. i can able to see confirmation yes and No button. But label was not displaying. so, requesting someone assistance in this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
30m ago
Try with this :
function onClick() {
g_modal.confirm(
'Confirmation',
'Are you sure you want to cancel this incident?',
function(confirmed) {
if (confirmed) {
g_form.setValue('state', '7');
g_form.save();
}
}, {
"cancelTitle": "No",
"confirmTitle": "Yes"
});
return false;
}
Reference: https://www.servicenow.com/docs/r/api-reference/g_modalClientAPINX.html
https://www.servicenow.com/community/developer-forum/workspace-yes-and-no-popup/m-p/3442253