The CreatorCon Call for Content is officially open! Get started here.

Activity on Incidents and Tasks

Brian Lancaster
Tera Sage

Can someone tell me what table the activity on incidents and task is saved?   Examples: comments added to a incident or RITM, assignment group change, etc.

3 REPLIES 3

camds
Kilo Expert

Hi Brian,



The view for activity is not saved in just one table, it is a view of items across a number of tables (such as sys_email). The sys_history_line table will give you a pointer to the data that is display there however.



A word of warning though doing queries on this table can have a performance impact so just be mindful if you're looking to run something querying this table.



Cheers,


Cameron


marcguy
ServiceNow Employee
ServiceNow Employee

also sys_history_line is only generated on demand, it's not a table that stores data after every action, only when a user looks at the history.



See my blog post here about capturing specific records via their history and generation the history sets up front:


Reporting on CI Changes - Using History Sets



sys_audit is the really, really big table that captures pretty much everything that happens to a record, but it's not really recommended to run reports on it.



Marc


marcguy
ServiceNow Employee
ServiceNow Employee

PS sys_audit_journal is used to store all of the journal fields entries (comments, work notes etc).



marc