- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2021 02:26 AM
Hi All,
I have 10 records only on whole table , now I want to update records So
When do we use next(), hasNext() and _next()
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2021 02:59 AM
Hi,
just to check if there is any record satisfying the query
hasNext() - does not actually go to that record but just tells true/false is there is any record matching the query
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
06-30-2022 02:27 AM
1. next() is used to get the next record in the GlideRecord.
2. hasNext() check the next record and return true/false.
3. _next() is used where the table already has a column name as next.