Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

iam facing problem of background script not showing the output

divya venna
Kilo Explorer

any one please help me

1 ACCEPTED SOLUTION

@divya venna 

Is your issue resolved?

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

Best Regards
Aman Kumar

View solution in original post

11 REPLIES 11

divya venna
Kilo Explorer

[0:00:00.039] Script completed in scope global: script


Script execution history and recovery available here

 

showing like this

@divya venna 

Try code shared by me:

var inc =new GlideRecord('incident');

inc.query();

while(inc.next())

{


gs.info(inc.getValue("number"));


}

 

Best Regards
Aman Kumar

Try this

var inc =new GlideRecord('incident');

inc.query();

while(inc.next())

{


gs.print('Incident number is' + inc.number)


}

This will show all the incidents so probably screen might get hanged so I would suggest try this in fix script and click on run in background or add filter condition as follows

var inc =new GlideRecord('incident');

inc.addQuery('active', true);

inc.query();

while(inc.next())

{


gs.print('inc.number')


}

Please hit like and mark my response as correct if that helps
Regards,
Musab

divya venna
Kilo Explorer

Thanks Aman iam suffring this issue since two

@divya venna 

Is your issue resolved?

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

Best Regards
Aman Kumar