- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2022 10:06 PM
"when Incident Priority is changing from 3 - Low or 2 - Medium to 1 - Critical then show a confirm popup message to confirm priority change with OK or Cancel buttons. "Priority will be changed to P1. Are you sure to proceed with this action?"
If user select OK, then only change the priority should change otherwise reset to old value.
If Priority changed to P1 then need to send email to caller.
Solved! Go to Solution.
- Labels:
-
Multiple Versions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2022 11:20 PM
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if(newValue=="1")
{
var res= confirm('Priority will be changed to P1. Are you sure to proceed with this action?');
if(res== true){
return true;
}
else{
g_form.setValue('priority',oldValue);
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2022 11:27 PM
Hello
You can create a notification for it on incident table
1) Create an notification on incident table and check updated check box
2) Give condition as priority changes to 1-critical
3) Go to whom to send tab and select caller as the recipient
and try to change the priority and see if the notification is triggering
Please mark my answer correct if it helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2022 11:20 PM
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if(newValue=="1")
{
var res= confirm('Priority will be changed to P1. Are you sure to proceed with this action?');
if(res== true){
return true;
}
else{
g_form.setValue('priority',oldValue);
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2022 11:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2024 07:20 AM
If I'm using this script and choosing cancel in confirm box, it is setting priority back to old value but impact and urgency are still the changed values (Which are impact = 1, urgency = 1) so when I click on save priority is still changing to 1, how can I change impact and urgency values to their old or previous values

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2022 10:11 PM
Hello,
If you don't mind, can you please share below information?
What have you tried? What is working? What isn't working?
Have you tried putting log statements to see where it is reaching ?
Unfortunately, at this point, you may have got requirements and that you've now given to us. Providing solution will resolve your issue but it will not help you to learn.
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2022 10:14 PM
Hello
You can try using on change client script on incident table
1) Create an On change client script on incident table and mention field as priority
2) Write the script below
script:
if(newValue=="1" || newValue==1) // replace 1 with your priority 1 back end value for choice
{
var answer = confirm('Priority will be changed to P1. Are you sure to proceed with this action?')
if(answer==true)
{
return true;
}
else
{
g_form.setValue('priority',oldValue); // just in case if there are priority look up rules on impact on urgency fields it might change it to 1. Setting it to oldvalue
}
}
Please mark my answer correct if it helped you