abhishekdalvi
Tera Guru

Hi @Chiranjeevi K ,

Please check with below script.

var loggedInUser = gs.getUserID();
var gr = new GlideRecord("incident");
gr.addEncodedQuery('assigned_to='+loggedInUser);
gr.orderByDesc('sys_created_on');
gr.setLimit(5);
gr.query();
while(gr.next()){
gs.print('incident number: '+gr.number);
}
 
Please mark this response as correct or helpful if it assisted you with your question.
 
Regards,
Abhishek Dalvi
Regards,
Abhishek Dalvi