Understanding the Audit Trail
Who is this article for?
Users wishing to view the audit trail.
Database Administrators wanting to know how this data is represented.
Audit Trails (sometimes referred to as Audit Logs) can be enabled through a customisation
and are a method to help administer the system.
This article explains how to view the audit trail in the application, and how the changes are logged.
1. The Audit Trail UI
If the Audit Trail is enabled, changes to records are logged and an audit trail can be viewed by end users.
They are automatically maintained in respect of the main user tables, capturing logs of the database changes. The logs include the details of when records were created or modified and can subsequently
be reviewed in the desktop application. When an item is deleted its log can only be accessed by looking at a database table and would require assistance from your database administrator.
- The logs are a snapshot in time, the data held is immutable and will not change.
- The logs are easily viewed through the associated property window.
- The logs are automatically sorted By Time in descending order (i.e. most recent at top).
The audit trail for any item is accessed through its properties window. Where the log is available the yellow icon will be shown in the top right:
Changes are highlighted as indicated by the boxed fields below:
The date range on view can be modified. Open the Expander Bar to select a Date Range and/or a Modified By (All Mine or Person).
2. The Database
If you your organisation hosts the application and you have access to the database, you can dig into the log tables directly.
Each logged table has a corresponding table, called *_log. For example, changes to Audit are logged to Audit_log.
At each data change, a new row is written to the log table. The user interface reads from the log table, and hence can show the history of changes. Note that there is no user interface for updating the log tables directly, so users cannot edit the logs.
Log tables are somewhat denormalised, which helps reading. While the structure of each table is different (and may be customised per customer), log tables have these common columns:
| Column name | Contains |
| ID | an ID for the log table row (not to be confused with the parent table's row ID) |
| ByID | Person.ID for the user making the change |
| ByName | Name of the user making the change |
| ByTime | Date and time the change was made (UTC) |
| ChangeCue | Whether the logged row was Added, Modified or Deleted. Unchanged means that an associated record was updated, but this record was unchanged. |