A problem about the data in sys_history_line table and sys_audit table

Bernie_BeAr
Tera Contributor

Hi all,

I exported CSV file from the sys_audit table this morning. But finding that when some requests were created, there were no records in the file, which should have been like this: from oldvalue-null to newvalue-1. However, when the requests become to another status, such as finished or somthing, the sys_audit table records it as: from oldvalue-1 to newvalue-2.

And in the sys_history_line table, I found the request changes that were not been recorded in the sys_audit table are in type of null instead of audit, which is the default value of audit type. By the way, the audit_sysid and internal_checkpoint also show 0.

So, I just wondering when requests are created, why some requests couldn't been recorded by the sys_audit table while some other requests can be correctly recorded. What's the influencing factor on these tables. What should I do to make sure all the changes on request table can be recorded from beginning to the end.

 If anyone can lend a hand, it would surely be appreciated.

Thanks in advance!

1 ACCEPTED SOLUTION

Alex Palegeorge
Tera Expert

Hi Bernie,

Check the glide.sys.audit_inserts system property. If it is set to false, then no audit record will exist for the initial insert of a record, and only updates will archived on the sys_audit table.

Also note that the data you can see when viewing the history of a record (actions menu > History > List) is not the sys_audit table, it is the sys_history_line table, so initial inserts may be captured here but not reflected in the sys_audit table.

I know this is late but I just found this thread when searching for myself, hopefully this helps someone.

View solution in original post

2 REPLIES 2

Alex Palegeorge
Tera Expert

Hi Bernie,

Check the glide.sys.audit_inserts system property. If it is set to false, then no audit record will exist for the initial insert of a record, and only updates will archived on the sys_audit table.

Also note that the data you can see when viewing the history of a record (actions menu > History > List) is not the sys_audit table, it is the sys_history_line table, so initial inserts may be captured here but not reflected in the sys_audit table.

I know this is late but I just found this thread when searching for myself, hopefully this helps someone.

Thanks Alex~👍