Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

History Table?

gaidem
ServiceNow Employee
ServiceNow Employee

Hello,

I'm confused over the sys_history_line table. It doesn't store all the records, but if I go to a record and view the history of it, the entries for that record become available.

The data must be stored somewhere, but doesn't appear in the sys_history_line table until the calendar history page is rendered. Also, the table is audited.

Any ideas how this works and where the audit history is stored?

Thanks,

2 REPLIES 2

Mark Stanger
Giga Sage

http://wiki.service-now.com/index.php?title=Viewing_History_Sets


haldroid
Tera Contributor

Under exactly what conditions do records get written to and deleted from sys_history_line and sys_history_set? This information determines when & how we might use these tables. Records in sys_history_set are "generated on use", whatever that means. Records in sys_history_line are "on four tables".

It looks as if each History [sys_history_line] record has a reference Set [set] to a Record History [sys_history_set] record, which in turn has a reference to the Table [table] and ID [id] of the audited record. Also note that labels for history tables differ between the wiki and current instances.

Clearer wiki docs here would save time when customers have an auditing requirement.