- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2019 02:10 AM
We are attempting to read the full list of table names using the SOAP API but not all tables are returned. In the System Error Log we see this
GlideRecord.setTableName - empty table name: org.mozilla.javascript.EvaluatorException: GlideRecord.setTableName - empty table name:
org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:77)
Any suggestions on what could be causing this would be most welcome.
Current platform Jakarta patch 3.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2019 02:26 AM
There are some tables that needs to be excluded.
Also there is a method called isValid which return whether it is a valid table or not
Here is the script that returns all the valid tables
var tble = new GlideRecord('sys_db_object');
tble.addEncodedQuery('sys_update_nameISNOTEMPTY^name!=v_wf_validation_report^nameISNOTEMPTY');
tble.query();
var count = 0;
while(tble.next()){
var gr = new GlideRecord(tble.name);
if(gr.isValid()){
gr.query();
gs.log('Table Name: ' + tble.name);
count++;
}
}
gs.log('Total Tables:' +count);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2019 02:13 AM
Hi,
have a look here:
https://hi.service-now.com/kb_view.do?sysparm_article=KB0647564
It has been fixed in Kingston.
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
Thank you
Cheers
Alberto

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2019 02:26 AM
There are some tables that needs to be excluded.
Also there is a method called isValid which return whether it is a valid table or not
Here is the script that returns all the valid tables
var tble = new GlideRecord('sys_db_object');
tble.addEncodedQuery('sys_update_nameISNOTEMPTY^name!=v_wf_validation_report^nameISNOTEMPTY');
tble.query();
var count = 0;
while(tble.next()){
var gr = new GlideRecord(tble.name);
if(gr.isValid()){
gr.query();
gs.log('Table Name: ' + tble.name);
count++;
}
}
gs.log('Total Tables:' +count);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2019 02:35 AM
Hello,
After upgrade to Jakarta upgrade, accessing a record producer in the Service Portal generates an error in the server logs: "GlideRecord.setTableName - empty table name".
Check this link that describes issues in the instance version: link.
If you find this helpful or correct please mark it.
Kind regards
FIKRI BENBRAHIM Mohamed Jawad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2019 12:34 PM
Hey
Any update on this?
If one of the responses provided above resolve your question, please mark the response as correct answer, so future readers can find solution easily.