Display Problem_id field state on incident form.

Sagar_pawar
Tera Contributor

Hello ALL,

on incident form there is problem_id field there.i want to populate state of problem_id on incident form.for populate value I wrote one script in UI Action.

 

function checkStateOfProblem() {

var data = g_form.getReference('problem_id', doAlert);


function doAlert(data) {
if (data.getValue('state') == 102 || 1 || 2 || -5) {
alert('you cannot cancel incident ticket because state is ' + data.getValue('state'));
alert((data.state).getDisplayValue());
alert(g_form.getDisplayValue('state'));
} else {
alert('you can cancel' + data.getValue('state'));

}
}

}

5 REPLIES 5

@Sagar_pawar did the server side fetched you correct state display value?


Raghav
MVP 2023