I want to retrieve the latest 10 records of case table

Poojitha8
Giga Contributor

I want to retrieve the latest 10 records of case table

1 ACCEPTED SOLUTION

Chandra Sekhar6
Tera Guru

You can use setLimit(10) method

 

 

var gr = new GlideRecord('sn_customerservice_case');

gr.orderByDesc('sys_created_on');

gr.setLimit(10);

gr.query();

View solution in original post

1 REPLY 1

Chandra Sekhar6
Tera Guru

You can use setLimit(10) method

 

 

var gr = new GlideRecord('sn_customerservice_case');

gr.orderByDesc('sys_created_on');

gr.setLimit(10);

gr.query();