state filed changed from closed to new but it is in grey colour?

praveensnow9984
Tera Contributor

When im trying to change state filed from closed to new but it is in grey colour? could you please help me out? The file is attached below

1 ACCEPTED SOLUTION

Nishant8
Giga Sage

Hello @praveensnow9984, I'm not sure why would you like to move Incident from Closed to New state as Closed is considered as final closure and you shouldn't move this back to New state. You may break ITIL process. Instead you should think of opening a new INC.

 

Regarding, why you see its greyed out - use below code, and you can see its editable.

var gr=new GlideRecord('incident');
gr.addEncodedQuery('numberININC0009001');
gr.query();
while(gr.next())
{
    gr.state='1';
	gr.incident_state='1';
    gr.close_code="Duplicate";
    gr.close_notes="closed notes updated by background script";
    gr.setWorkflow(false);
    gr.autoSysFields(false);
    gr.update();
}

 

Regards,

Nishant

View solution in original post

4 REPLIES 4

praveensnow9984
Tera Contributor
var gr=new GlideRecord('incident');
gr.addEncodedQuery('numberININC0009009,INC0007001,INC0009003,INC0009002,INC0010004');
gr.query();
while(gr.next())
{
    gr.state='1';
    gr.close_code="Duplicate";
    gr.close_notes="closed notes updated by background script";
    gr.setWorkflow(false);
    gr.autoSysFields(false);
    gr.update();
}

Nishant8
Giga Sage

Hello @praveensnow9984, I'm not sure why would you like to move Incident from Closed to New state as Closed is considered as final closure and you shouldn't move this back to New state. You may break ITIL process. Instead you should think of opening a new INC.

 

Regarding, why you see its greyed out - use below code, and you can see its editable.

var gr=new GlideRecord('incident');
gr.addEncodedQuery('numberININC0009001');
gr.query();
while(gr.next())
{
    gr.state='1';
	gr.incident_state='1';
    gr.close_code="Duplicate";
    gr.close_notes="closed notes updated by background script";
    gr.setWorkflow(false);
    gr.autoSysFields(false);
    gr.update();
}

 

Regards,

Nishant

Hi Nishant

 

Im trying to get free servicenow certification done. But where can i find these from online. Could you please help me out

Hello @praveensnow9984, you can login to https://learning.servicenow.com/ where you can find all the certification and other details. Also, you can track your learning details at https://learning.servicenow.com/now/lxp/learning-dashboard

There are two types of certifications available: Mainline and Micro.

In the Mainline certification track, the CSA certification is available free of cost (please check the current status), but other Mainline certifications—such as CAD, CTA, etc.—are paid.

Micro certifications—such as Flow Designer, Integration Hub, etc.—are available free of cost. I strongly recommend going through them, as they can help you focus on specific areas.

 

Regards,

Nishant