Who changed what: auditing
Turn auditing on for a table and every create, update and delete of its records is recorded, with who made the change and what each field was before and after. Leave out the fields that don't matter, and read a record's history in the Audit Log.

A customer's phone number is wrong, and it was right last week. Who changed it, and to what? If the table is audited, the platform can tell you.
In this article we turn auditing on for Account, the table every environment is created with, then let two people from a field sales team edit an account and read back what they did. Every picture is the real product.
Turn it on for a table
Open your solution's Tables, select the table, and choose Toggle audit from the ⋯ menu. The Audit column changes to On:

From that moment every create, update and delete of the table's records is recorded. Changes made before it was turned on are not filled in afterwards.
Auditing is part of the table's definition, so it travels with the table when its solution is deployed to Test or Production. You don't have to remember to switch it on again there.
Leave out what you don't need
Not every field is worth recording. A long description that people rewrite all the time fills the log without telling you much. Open the table's Fields, select the field and choose Exclude from audit. Its Audit column changes to Excluded:

Include in audit puts it back. As with the table switch, it only affects changes made from then on.
Read the history
Now two people from the sales team open Proseware Group. Sam Taylor changes its main phone number, and a little later Robin Park changes the number of employees and rewrites the description.
To see what happened, open Audit Logs in the Admin Control Center, choose the environment,
type the table's logical name (account) and, to follow one record, its id. The id is the last
part of the record's address when it is open in an app. Select Query:

The newest change is at the top, and each one says:
- when it happened, in UTC;
- what was done: a create, an update or a delete;
- who did it: the person by name, or the process, integration or rule that made the change. When a rule or a process acted for somebody, the Agent column names it;
- what changed, field by field, as the value before and the value after.
Robin's new description isn't there, because Description is excluded. The employee count they changed in the same save is.
How it works underneath
Turning auditing on for a table does something you can't see from the screen: it puts a trigger on the table in the environment's database. A trigger is a small piece of the database that runs whenever a row is inserted, updated or deleted, whoever did it. For an audited table, it writes one entry to the environment's audit log, holding:
- the table, the record's id and the operation;
- for an update, each changed field with its old and new value;
- the time, in UTC;
- who was acting, read from a note every part of the platform leaves on its connection before it writes.
That last point is the important one. Each part of the platform that writes data, the form, the import, a server rule, a process, an integration, declares who it is acting for before it writes. The trigger reads that note and stores it with the change. So the log doesn't only say User; it can say a process, on behalf of Sam Taylor, at the task Send invoice.
In the table's document, the switch is one line, which is how it travels to Test and Production with the table:
{
"logicalName": "account",
"isAuditEnabled": true
}
What the who can say
The actor on an entry is one of a few kinds, and each tells you where to look next.
| Actor | What it means | Where to look next |
|---|---|---|
| A user, by name | Somebody changed it on a form, in an import or from a list | Ask them |
| An external app | An integration, by its app registration | Register an external app |
| A hosted app | A custom app or control running inside the platform | Build a custom React app |
| A process | A step of an approval or another process | Watch a process run |
| A background worker | Work that ran after a save, such as an asynchronous rule | When background work fails |
| System, or nobody | The platform itself, such as a solution import, or a change made straight in the database | See below |
When the actor is automated, the Agent column names the mechanism: which script, which process task, which control. And when a person started the chain, their name is kept too. A user who submitted a request on Monday, which a process updated on a timer on Friday, appears on Friday's entry as well as the process.
A change nobody made
An entry with no actor at all is the one worth investigating. Every path through the platform says who it is, so an anonymous change means somebody wrote to the database directly, with an admin tool or a script that went round the platform. The trigger caught it anyway, because it fires in the database, not in the platform. Without the trigger, that change would simply not exist in any log.
Choosing what to audit
Auditing every table costs disk space and makes the log harder to read. Auditing nothing leaves you unable to answer the questions that matter. A reasonable starting point:
- Audit tables whose values have consequences: customers and their contact details, prices, approvals, budgets, anything money or a person's rights depend on.
- Audit tables an external system writes to, so you can tell its changes from your people's.
- Don't audit tables that are rebuilt constantly or hold copies of data kept elsewhere, such as a cache of an exchange rate fetched every hour.
- Exclude fields that change constantly and say little: long notes rewritten every visit, a last viewed date, a counter.
The sample solutions follow the same instinct. The capital planning sample audits its requests, where an approval depends on the amount, and leaves its reference tables alone.
How long entries are kept
Each environment keeps its own log, inside its own database schema, beside the data it describes. Entries older than the retention period, 180 days unless your installation sets another, are removed by a regular clean-up. If you need a longer record, for an audit by regulators for example, ask whoever runs your installation to raise the period. The setting is one for the whole installation, so it applies to every environment.
Because the log lives in the environment, deleting an environment deletes its log with it. Its history doesn't outlive it, and Development's experiments never appear in Production's log.
Following one record's story
The audit log reads best one record at a time, from the bottom up. Suppose Proseware Group's credit limit is lower than the sales team expected, and somebody asks why. Filtered to the account, the entries tell the story in order:
- A create, eight months ago, by the import that brought the customers in. The actor is the person who ran it, and every field has its first value.
- An update by an integration, its external app registration named as the actor, changing the credit limit from 50,000 to 75,000 after the customer's first year.
- An update by a process, on behalf of the account manager, setting Credit hold to Yes when an invoice went unpaid.
- An update by a person in finance, lowering the credit limit to 40,000, three days later.
Each step names who acted and what changed, so the answer to why is a name and a date, not a guess. The record itself only ever shows the latest value; the log is what keeps the path to it.
Questions you can answer with it
- Who changed this customer's bank details, and when? Filter on the table and the record, and read down the changed column.
- What did the overnight import change? Filter on the table and the time of the import; every entry shows the person who ran it.
- Did the approval process really set this amount, or did somebody edit it after? The actor on each entry says which.
- Is an integration writing more than it should? Filter on the table and look for entries from the external app's registration.
The audit log in the security series goes through the screen's filters in more detail.
Questions that come up
Can somebody edit or delete an audit entry? Not from the platform. The log has no edit screen, and nothing in the platform writes to it except the triggers and the retention clean-up.
Does auditing slow saves down? A little: each audited save writes one extra row. For the tables worth auditing, that is a good trade.
Are files recorded? The change of reference is, so you can see that a document was replaced and by whom. The files themselves aren't copied into the log.
Can I see a record's history from the app? The Audit Logs screen in the maker portal is where it is read, filtered by table and record, by whoever may open that screen. People who only use the apps don't see the log.
Recorded wherever the change comes from
The log is written by the database, not by the screen. A change made on a form, by an import, by a business rule, by a process or by an integration calling the API is recorded the same way. A change that bypassed the platform and went straight into the database shows no actor, and that is worth looking into.
Each environment keeps its own log, so Development's history never mixes with Production's, and old entries are removed after the environment's retention period.
Next: what happens when two people save the same record at once, and why nobody's change quietly disappears.