- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2017 01:53 AM
i have to show
Warning Message: if request=='Remove Access' | ||||
This will revoke all your access from the group and group associated access rights | ||||
Click OK to continue or Cancel to stay on the page |
i wrote
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var checkREMOVE=g_form.getValue('request_type');
if(checkREMOVE=="remove")
{
g_form.addErrorMessage("okokok"); //here i have to show the message with oK and Cancel buttons
}
//Type appropriate comment here, and begin script below
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2017 01:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2017 02:09 AM
Please ignore my previous responses, i just learnt I was wrong on addErrorMessage

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2017 02:13 AM
If you want to print the error message, use g_form.showFieldMsg('impact','Low impact not allowed with High priority','error');
Refer : GlideForm (g form) - ServiceNow Wiki
If you need with the ok and cancel button window.confirm('Message here');
Hope this helps.