How does GlideRecordSecure.chooseWindow() method work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2020 02:07 AM
Hi,
How does GlideRecordSecure.chooseWindow(firstRow, lastRow) method work?
var gr = new GlideRecordSecure('incident');
gr.orderBy('number');
gr.chooseWindow(2, 4);
gr.query();
if (gr.next()) {
gs.info(gr.number + ' is within window');
}
Will it check all ACLs first then returns the rows in range set by chooseWindow() method?
(or) will it first query the rows in the range set by chooseWindow() method and then apply ACLs on them?
I want first behaviour. As per my testing, it is working in other way.
Can someone clarify?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2020 02:23 AM
Hi,
refer below links for help
Scripts - understanding when ACLs are evaluated
getRowCount() incorrect when using GlideRecordSecure()
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2020 02:35 AM
Thanks for replying.
These links are not mentioning anything about how does chooseWindow() method work.
Regards