How to get incident records which are closed in last 24 hours?

Nikhil40
Tera Contributor
 
2 ACCEPTED SOLUTIONS

SanjivMeher
Mega Patron

In the Incident filter, you can use below condition to get those records

 

SanjivMeher1_0-1665658544694.png

 

View solution in original post

Priyanka Dundal
Kilo Expert

You can try like this if you want to use script.

var gr = new GlideRecord("incident");
gr.addEcodedQuery("closed_atRELATIVELT@hour@ago@24");gs.print("incident which are closed from 24 hr are as follow :");
gr.query();
while(gr.next())
{

gs.print(gr.number);
}
gs.print("total count : " + gr.getRowCount());

View solution in original post

3 REPLIES 3

SanjivMeher
Mega Patron

In the Incident filter, you can use below condition to get those records

 

SanjivMeher1_0-1665658544694.png

 

Nikhil40
Tera Contributor

Thanks, Its working for me

Priyanka Dundal
Kilo Expert

You can try like this if you want to use script.

var gr = new GlideRecord("incident");
gr.addEcodedQuery("closed_atRELATIVELT@hour@ago@24");gs.print("incident which are closed from 24 hr are as follow :");
gr.query();
while(gr.next())
{

gs.print(gr.number);
}
gs.print("total count : " + gr.getRowCount());