Join us Dec. 16 for The Community Hour, our first global virtual User Group event!

How does `setLimit()` determine which records to retrieve when no sorting order is specified?

Release: Brazil
nagagunasekhar
Kilo Explorer

Question: How does setLimit() determine which records to retrieve when no sorting order is specified in GlideRecord?

When we use setlimit( 5 ) without specifying orderby() or orderbydesc(), how does ServiceNow determine which five records to return?

Does it depend on the database execution plan, an internal default ordering, or some other mechanism?

I'd appreciate an explanation of the underlying behavior.

0 REPLIES 0