- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2020 02:38 PM
Hi ServiceNow Community!
I am trying to created a GlideRecord query ignoring domain separation using queryNoDomain(), but I get the error, "Submit canceled due to a script error - please contact your System Administrator" when I test the script.
I know the error comes from when queryNoDomain() is called, but I'm stuck on what to do next troubleshooting. Is there a way I can find the code for queryNoDomain? Or is there a way for me to confirm that this method is enabled?
I also was not sure which forum to post this question to (here or DevOps), so if i should remove one of these posts please let me know.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2020 03:59 PM
As you have Client script so queryNoDomain doesn't work on client side. Also, GlideRecord in client script is not a good practice. You should use GlideAjax in client script and write script include to process server side code and in there you can use queryNoDomain().
Please Refer GlideAjax doc - https://docs.servicenow.com/bundle/orlando-application-development/page/script/ajax/topic/p_AJAX.htm...
Thanks & Regards,
Sharjeel
Muhammad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2020 03:59 PM
As you have Client script so queryNoDomain doesn't work on client side. Also, GlideRecord in client script is not a good practice. You should use GlideAjax in client script and write script include to process server side code and in there you can use queryNoDomain().
Please Refer GlideAjax doc - https://docs.servicenow.com/bundle/orlando-application-development/page/script/ajax/topic/p_AJAX.htm...
Thanks & Regards,
Sharjeel
Muhammad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2020 04:09 PM
Thank you!