Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

updation of incident state and assignee

suvi1
Tera Contributor

I can able to update the Assignee Value to null, but incident state is not getting updating.

 

Below is the code.

 

  var inctkts="numberSTARTSWITHINC^active=true^stateIN2,3,6";
     var gr= new GlideRecord('incident');
  gr.addQuery('assigned_to', username1);
  gr.addEncodedQuery(inctkts);
  gr.query();
 
  while(gr.next()){
 
if (gr.getRowCount() > 0) {
        
gr.assigned_to='  ';
gr.state="-2";
gr.update(); 
 
}
       }

 

can any one sugguestions on the same,,

 

 or any other blockers to update the assignee value???

0 REPLIES 0