I need to change state to close of bulk problem tickets at a time

poco
Tera Contributor
var gr = new GlideRecord('problem');
gr.addQuery(' my condition');
gr.query();
while (gr.next()) {
    gr.setValue('state', 'closed');
    gr.update(); 
}
i used above simple fix script  but  it was not working  help me for this 
1 REPLY 1

Elijah Aromola
Mega Sage

Did you check the state value on the table? They're normally numbers like 107 as an example. The rest looks fine.