- 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 01:58 AM
Please use :
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
alert("okokok");
}

- 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:15 AM
Thanks it solved my issues in almost no time

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2017 02:00 AM
Also, please note that addErrorMessage function is a server side function which you can use in Business Rule or Script Include.
Please find more details here: GlideSystem - ServiceNow Wiki