Change Incident State to New from On Hold whenever Assignment Group Changes

SNOW46
Tera Contributor

Hi All,

Currently I want to change the State of Incident from On Hold to New whenever there is a change in Assignment Group on the form.

Can anyone suggest me how to achieve the same.

 

Thanks

1 ACCEPTED SOLUTION

AbhishekGardade
Giga Sage

Hello  SNOW@das,


1. With the help of onChange client script you can achieve this.

 find_real_file.png

 SCTIPT: 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if(g_form.getValue('assignment_group') !='' ){
g_form.setValue('incident_state', 1); // 1 is value of New State
}

//Type appropriate comment here, and begin script below

}

OR

2. You can write Before INSERT / Update Business Rule and adding condition Assignment Group changes AND Assignment Group IS not Empty.

find_real_file.png

 Business Rule Script :   current.incident_state = 1; // Replace 1 with your NEW state Value

Thanks,

Abhishek Gardade

Thank you,
Abhishek Gardade

View solution in original post

4 REPLIES 4

AbhishekGardade
Giga Sage

Hello  SNOW@das,


1. With the help of onChange client script you can achieve this.

 find_real_file.png

 SCTIPT: 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if(g_form.getValue('assignment_group') !='' ){
g_form.setValue('incident_state', 1); // 1 is value of New State
}

//Type appropriate comment here, and begin script below

}

OR

2. You can write Before INSERT / Update Business Rule and adding condition Assignment Group changes AND Assignment Group IS not Empty.

find_real_file.png

 Business Rule Script :   current.incident_state = 1; // Replace 1 with your NEW state Value

Thanks,

Abhishek Gardade

Thank you,
Abhishek Gardade

Hello SNOW@Das,

Any updates on this?

Please mark answer correct if you found it as helpful.

Thanks,

Abhishek Gardade

Thank you,
Abhishek Gardade

Hello SNOW,

You can Click on Mark as Correct Answer as below. So it will be removed from unanswered questions queue and that will be helpful for others as well.

find_real_file.png

Thanks,

Abhishek Gardade

Thank you,
Abhishek Gardade

Done Bro..