- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2017 08:03 AM
Hi guys,
I would like to make a query on sys_audit_delete table but apparently it's not possible, indeed i always got a isValidRecord == false.
my code:
var myRecord = new GlideRecord('sys_audit_delete');
myRecord.addQuery('tablename', 'incident');
myRecord.addQuery('documentkey', 'myexistingdocumentkey');
myRecord.query();
gs.addInfoMessage(myRecord.isValidRecord()); //false
Also i can't access to this table through the rest API explorer.
Do you know why ? and if there is a possibility to access to the record (only read) of this table in a script include ?
Thanks a lot.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2017 08:27 AM
Hi Thibaut,
Try something similar as below and it worked. just changed the table name and document key and it is returning true. Can you check it
var myRecord = new GlideRecord('sys_audit_delete');
myRecord.addQuery('tablename', 'u_vp_task_relationship');
myRecord.addQuery('documentkey', 'a2ba47bbdb304700566cfe18bf96193e');
myRecord.query();
if(myRecord.next())
{
gs.addInfoMessage(myRecord.isValidRecord()); //false
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2017 08:21 AM
Are you able to view the contents of this table as I believe you need to be a workflow_admin to view the contents.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2017 08:25 AM
I'm already able to see the data when i go in 'show list' in the table page.
Even with this role, i can't see the table in the rest api explorer.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2017 08:28 AM
Hello Thibaut,
Try with the below-updated code.
var myRecord = new GlideRecord('sys_audit_delete');
myRecord.addQuery('tablename', 'sys_app_module');
myRecord.addQuery('documentkey', '2cd790784f700300f3823879b110c77e');
myRecord.query();
myRecord.next();
gs.addInfoMessage(myRecord.isValidRecord()); //false

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2017 08:27 AM
Hi Thibaut,
Try something similar as below and it worked. just changed the table name and document key and it is returning true. Can you check it
var myRecord = new GlideRecord('sys_audit_delete');
myRecord.addQuery('tablename', 'u_vp_task_relationship');
myRecord.addQuery('documentkey', 'a2ba47bbdb304700566cfe18bf96193e');
myRecord.query();
if(myRecord.next())
{
gs.addInfoMessage(myRecord.isValidRecord()); //false
}