Invalid query detected, please check logs for details [Unknown field item in table sc_req_item]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 01:44 AM
Invalid query detected, please check logs for details [Unknown field item in table sc_req_item]
this error is shown as warning in logs, how to debug this
schedule script is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 02:12 AM
Still not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 02:15 AM
In EVENT logs I get
login.failed

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 02:21 AM
Don't see so quickly anything that has to do with that.
Have you tried adding debugging to your script? To see up to which point the script is working, from which point it isn't? Also adding debugging to see if variables etc contain the values you would expect. That would shorten your search immensly.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020-2022 ServiceNow Community MVP
2020-2022 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 02:37 AM
Checked
var rec = new GlideRecord('sc_req_item');
rec.addQuery('assignment_group', '0cfdca83db521bc0babf79fdae9619f9'); // SP Materials Management
rec.addQuery('u_export_state', 'ready for export');
rec.addQuery('item', '4514ea12db481c104f545e38dc9619b5'); // ENVI Item Add Form
rec.query();
while (rec.next()) {
gs.info("this is for test"+" "+rec.number);
var a = '';
var loc = new GlideRecord('cmn_location');
loc.addQuery('sys_id', rec.variables.dv_location);
loc.query();
while (loc.next()) {
var location = loc.u_financial_code;
var master = location;
if (location == '552-0000') {
master = 'Master';
code is not able to query the record in this schedule script
but when i copied same code in fix script and run fix script as admin
it works fine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 02:31 AM
You can go through the below thread. It may help you
https://community.servicenow.com/community?id=community_question&sys_id=e3468007dbf990502737e15b8a9619df