We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

when problem is created change related incident state to onhold and onhold reason is awaiting caller

PSaiSowjanya
Kilo Contributor

when a problem is created change related incident state to onhold and onhold reason is awaiting caller.
Table:Problem
when to run: After Insert

Script:

var gr = new GlideRecord('incident');
gr.addQuery('problem_id', current.sys_id);
gr.query();
if (gr.next()) {
current.state = 3;
current.hold_reason = 1;
}

I have tried this code,But It is not executing as expected,After creating problem  record on related incident form it is showing state as onhold and on hold reason is awaiting problem.
 
0 REPLIES 0