- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2022 10:47 PM
Hi i have an issue on how to see log in scoped application for fix script.
to log the row count and see what method we should use?
var count = 0;
var grBook = new GlideRecord('sys_ui_bookmark');
grBook.addEncodedQuery('urlSTARTSWITHu_x_test_eclassi_eclassmot_list.do');
grBook.query();
gs.log("Total no of fovourites count:" + grBook.getRowCount()); //// what to use here to see the row count in logs
while (grBook.next()) {
grBook.deleteRecord();
count = count + 1;
}
gs.log("Total number vof record deleted in book mark:"+count); //// what to use here to see the row count in logs
Thanks
Solved! Go to Solution.
- Labels:
-
Script Debugger
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2022 12:03 AM
Hi,
gs.log(); is not supported in scoped application.
You have to use either gs.info(); or gs.debug();
Thanks,
Sagar Pagar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2022 10:58 PM
Hi,
Use gs.print() instead of gs.log() for scoped applications.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2022 11:02 PM
Hi,
gs.log will not work in scoped applications.
use gs.info or refer below link for other logs
https://community.servicenow.com/community?id=community_question&sys_id=6f6e55d6db6e2b005d782183ca9619a2&view_source=searchResult
Hope you it helps you.
Please Mark ✅ Correct/helpful if applicable, Thanks!!
Regards
Pavankumar
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2022 12:03 AM
Hi,
gs.log(); is not supported in scoped application.
You have to use either gs.info(); or gs.debug();
Thanks,
Sagar Pagar