- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2016 09:56 AM
I tried with this script but it doesn't works .
if (( oldValue == -5 && newValue == 1 ) || ( oldValue == -5 && newValue == 2 ) || ( oldValue == -5 && newValue == 7 ) || (oldValue == -5 && newValue == 4) || (oldValue == -5 && newValue == 5))
{
return confirm('Incident in Pending state can only move to In Progress or Resolved');
reloadWindow(incident);
location.reload();
var answer = confirm("Incident in Pending state can only move to In Progress or Resolved");
alert('success1'+answer);
if (answer == ok)
{
alert('success');
reloadWindow(window);
}
else
reloadWindow(window);
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2016 09:59 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2016 09:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2016 10:11 AM
Tried but seems it doesn't work
return confirm('Incident in Pending state can only move to In Progress or Resolved');
location.reload(forceGet);
also with
location.reload(true);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2016 10:06 AM
Why would you not just remove those options in the field.
onLoad
if(g_form.getValue('state') == -5){
g_form.removeOption('state', 1);
g_form.removeOption('state', 4);
[etc...]
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2016 10:11 AM