The CreatorCon Call for Content is officially open! Get started here.

Get the records of incidents which is of priority high and category software limit it 10

aparna reddy1
Tera Contributor

hii all,

 

Get the records of incidents which is of priority high and category software

limit it 10 using background script.

 

thanks in advance.

1 ACCEPTED SOLUTION

Viraj Hudlikar
Tera Sage
Tera Sage

var abc= new GlideRecord('incident');

abc.addEncodedQuery('priority=2^active=true^category=software');

abc.setLimit(10);

abc.query();

while(abc.next())

{

gs.print(abc.number);

}

View solution in original post

1 REPLY 1

Viraj Hudlikar
Tera Sage
Tera Sage

var abc= new GlideRecord('incident');

abc.addEncodedQuery('priority=2^active=true^category=software');

abc.setLimit(10);

abc.query();

while(abc.next())

{

gs.print(abc.number);

}