We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

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

12 REPLIES 12

Harish KM
Kilo Patron

can you share the script?

Regards
Harish

divya venna
Kilo Explorer

var inc =new GlideRecord('incident');

inc.Query();

while(inc.next())

{


gs.print('inc.number')


}

var inc =new GlideRecord('incident');

inc.query();

while(inc.next())

{


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


}

Best Regards
Aman Kumar

What is the exact requirement?

 

var inc= new GlideRecord("incident");
inc.query();
while(inc.next())
{

gs.print("INC number"+inc.number); // you missed this to print
}

 

Regards
Harish