Trail Map โ€บ Use-Case Catalog โ€บ Audit & Debug Logs
๐Ÿ“œ Admin & Extend ยท Module 12

Audit & Debug Logs: Turn an Audit Into a Search

Know who changed what, and when โ€” permanently and provably โ€” plus a troubleshooting trace for when something doesn't behave as expected.

4
Units
~8 min
Time to Complete
80 pts
Available
1 Badge
Compliance Guardian
Unit 1 ยท Business Problem

Why an immutable audit trail matters

PL
Priya Lall ยท Compliance Officer

"Legal is asking who changed the value on this contract, and when. Our compliance review is in two weeks, and I need a real answer โ€” not a guess based on who usually touches that record."

Without a system-level audit trail, "who changed this and when" becomes a slow, unreliable investigation involving emails, memory, and guesswork.

๐Ÿ’ก
Business outcome
Any change to any record can be reconstructed and attributed on demand โ€” compliance reviews become a lookup, not an investigation.
Unit 2 ยท How It Works

Two different logs, two different jobs

LogPurposeLifespan
Audit LogPermanent record of every CREATE / UPDATE / DELETE, with before/after values and who did itImmutable, append-only, kept indefinitely
Debug LogTechnical execution trace โ€” validation, workflow steps, formula evaluation โ€” for one specific operationTransient; intended for troubleshooting, can be cleared by an admin
โœ…
What's captured on each action
beforeJson is null on CREATE (nothing existed before); afterJson is null on DELETE (nothing exists after). Every other combination captures both states.
Unit 3 ยท Hands-On Challenge

Trace a field change back to its source

Make a changeOpen any Opportunity and edit its Amount field, then save.
Open the Audit LogSetup โ†’ Audit Log โ†’ filter by object = Opportunity.
Inspect the entryConfirm it shows the before and after Amount values, the username who made the change, and the timestamp.
Check record-level historyOpen that same Opportunity's detail page and view its change history directly.
Review a Debug Log (optional)Setup โ†’ Debug Logs โ€” open a recent session to see the validation and workflow trace for that same save.
Unit 4 ยท Knowledge Check

Test what you learned

1. What is beforeJson set to on a CREATE audit entry?
Null โ€” there was no prior state
A copy of the default field values
2. Can an admin clear Debug Logs?
Yes โ€” they're transient troubleshooting data, not permanent records
No โ€” they're immutable just like Audit Logs