How to request sys_audit_delete table ?

thibautdeflandr
ServiceNow Employee

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.