Resources /
Blog

Salesforce Audit Trail Retention: Setup Audit Trail, Field History and Field Audit Trail

Submit your details to get a book

7
Min Read
Resources /
Blog

Salesforce Audit Trail Retention: Setup Audit Trail, Field History and Field Audit Trail

Download

Submit your details to get a book

7
Min Read
Magnifying glass on a pillar linked to clock and document tiles, illustrating Salesforce audit trail retention
Magnifying glass on a pillar linked to clock and document tiles, illustrating Salesforce audit trail retention

Setup Audit Trail logs configuration changes, Field History Tracking captures data changes on records, and Field Audit Trail holds field history for the long haul. Each keeps it for a different stretch of time, and those gaps in Salesforce audit trail retention are where compliance audits get awkward.

Say an auditor asks who switched off a validation rule on Opportunities last March. You'll go looking for "the Salesforce audit trail," find three separate tools, and possibly no answer at all.

We'll go through the three tools and hold them up against the actual SOX, HIPAA and GDPR text. Then we'll cover what to do once Salesforce stops keeping the evidence for you.

Which three tools make up the audit trail in Salesforce?

Where your audit history lives depends on what kind of change you're chasing. For the limits, we went straight to Salesforce's documentation on Setup Audit Trail and Field History Tracking.

In the table, watch the last two columns: how long Salesforce's retention lasts, and what you need to keep history longer.

ToolWhat it recordsField limitHow long Salesforce keeps itWhat you need
Setup Audit TrailChanges made in Setup, such as users, permissions and configurationNot field-basedLast 20 changes on screen, 180 days by downloadIncluded
Field History TrackingOld and new values on tracked fields of standard and custom objectsUp to 20 fields per objectUp to 18 months in the org, 24 months via the APIIncluded
Field Audit TrailThe same field history, archived under a retention policyUp to 200 fields per objectUntil you delete it, under the retention policy you setSalesforce Shield or a Field Audit Trail license (paid)

We took the field limits from Salesforce's Field Audit Trail guide, and the Salesforce Shield page backs up the 200. Numbers like these can change between releases, so recheck them before you plan around them.

What does Setup Audit Trail record?

Setup Audit Trail is the tool for that validation rule question, because it logs administrative and configuration changes made in Setup, with who made each change and when. Think new Salesforce users, password resets, profile and permission modifications, and changes to objects or automation.

The View Setup Audit Trail page only shows the last 20 changes. For anything older you download a CSV file, which reaches back 180 days, and after that Salesforce deletes the records automatically.

So last March's validation rule change is already gone, unless somebody exported the log before it aged out of your Salesforce org.

If you're tidying up access at the same time, our guide to permission sets makes those changes easier to trace later.

What does Field History Tracking keep, and for how long?

Field History Tracking works at the record level, logging each change to a tracked field with the old and new values, the user and the date and time. You switch it on object by object, for standard objects and custom objects, up to 20 fields apiece.

Standard field history tracking keeps data up to 18 months in the org and 24 through the API, per Salesforce Help on field history. After that it's gone unless archived.

Twenty slots disappear fast. Spend them on fields someone will ask you to explain later: amounts, stages, owners, approval status and anything personal or regulated.

When do you need Field Audit Trail?

When 18 months of field-level changes won't satisfy an auditor, you're into Field Audit Trail territory. The Salesforce Shield page says it tracks up to 200 fields per object under your retention policies.

Once it's on, Salesforce Help says field history is kept until you delete it. Archived field-level changes live in FieldHistoryArchive, a big object you read with API queries and the Retain Field History permission.

It's paid, sold with Shield or as its own license, and your retention rules decide what gets kept. Our Field Audit Trail guide covers setup and querying the archive, so read it before you buy.

What about logins, API calls and data exports?

None of the three was built to track logins, integration API calls or big report exports. That's Event Monitoring's job, and the Shield page lists it next to Field Audit Trail for user activity.

If your auditing scope covers access as well, look at Event Monitoring now rather than later. Both live in Shield, so you might as well get them quoted together.

How long do SOX, HIPAA and GDPR expect you to keep records?

None of these regulations says a word about Salesforce logs. Their timelines don't match Salesforce's retention windows either, so read the actual text before you set your own retention rules.

RegulationWhat the text requiresPeriod
SOX (SEC rule 17 CFR 210.2-06)The auditor keeps workpapers and records relevant to the audit, including electronic records7 years after the audit ends
HIPAA Security Rule (45 CFR 164.316 and 164.312)Audit controls that record and examine activity in systems holding ePHI; required security documentation kept6 years for documentation
GDPR (Article 5)Keep personal data no longer than necessary, and be able to show you complyNo fixed period

The seven-year duty in 17 CFR 210.2-06 falls on your outside auditor, not on you. Your change records and audit data may well end up in those workpapers, and our SOX compliance tools roundup covers pulling them together.

HIPAA's audit controls standard requires activity to be logged but never says how long to keep the logs. The six years people quote come from 164.316, and they apply to required security policies and documented actions.

GDPR pulls in the opposite direction. Article 5 limits how long you keep personal data and expects you to prove you comply, so storing audit records with personal data needs a retention period you can defend.

How do you close the gap between Salesforce retention and audit needs?

Start from how much history your auditors and legal team actually need, then work back to the tools. Our post on data retention policies shows how to write one for Salesforce.

Every gap in the table has a fix next to it. The first two apply whether or not you buy Shield.

GapFix
Setup Audit Trail drops changes after 180 daysDownload the CSV on a schedule, well inside the window, and store it where admins can't edit it
Field history drops after 18 months (24 via the API)Buy Field Audit Trail, or export history on a schedule before it ages out
Fields beyond the 20 tracked per objectField Audit Trail's higher limit, or rethink which fields need history
Deployments and metadata changes aren't tied to approvalsRun releases through a pipeline with version control and recorded approvals
Exports nobody has tried to read backTest a retrieval before audit season, the same way you'd test a restore

Store exported audit trail logs in an external location the people they describe can't touch. An administrator who can make setup changes shouldn't also be able to edit or delete the archive.

Deployment history is the piece that usually goes missing. Setup Audit Trail tells you a change happened, but not the ticket, approver or code review behind it.

That gap gets filled by version control, sound release management practices and a real change management process. Our change management guide shows how to set one up.

And back up the audit history itself. If records get deleted or a Salesforce org gets corrupted, your backup and recovery strategy is what shows how the data used to look.

Where does Flosum fit?

Flosum says Flosum DevOps keeps change history beyond the 180-day Setup Audit Trail and builds audit evidence inside the release pipeline. The same page lists segregation of duties, approvals and one-click rollback.

Its risk and governance page lists tracking for deployments, approvals, metadata changes and release activity across Salesforce environments. That covers the deployment row in the table, while record-level history stays with Field Audit Trail.

Flosum runs Flosum-hosted or customer-hosted, and the deployment architectures page explains each.

Our post on deployment models compares them, and for controls there's the SOX compliance page and our guide to Salesforce compliance.

FAQs

What is the Salesforce audit trail?

Three tools, not one. Setup Audit Trail logs configuration changes, Field History Tracking logs changes to the fields you pick, and Field Audit Trail keeps that history for longer.

How long does Salesforce keep Setup Audit Trail data?

You can download the last 180 days of setup changes as a CSV, according to Salesforce Help. The Setup page itself shows only the 20 most recent changes.

How long is Salesforce field history kept?

Up to 18 months in the org and 24 months through the API, per Salesforce Help on Field History Tracking. With Field Audit Trail on, it's kept until you delete it.

How many fields can I track in Salesforce?

Field History Tracking covers up to 20 fields per object, as Salesforce's Field Audit Trail guide explains. The Salesforce Shield page says Field Audit Trail tracks up to 200.

Is Field Audit Trail included in Salesforce?

No. It's paid, sold as part of Salesforce Shield or as a standalone Field Audit Trail license.

Does SOX require seven years of Salesforce audit logs?

Not in those words. The SEC rule at 17 CFR 210.2-06 makes the auditor keep audit records for seven years, and your change records can form part of that evidence.

Does Setup Audit Trail show deployment approvals?

No. It shows that a setup change happened and who made it, but not the approval or ticket behind it; for that you need a release pipeline with tracked approvals.

Book a demo to see how Flosum DevOps records deployments, approvals and change history for your audits.

Table Of Contents
Author
Stay Up-to-Date
Get flosum.com news in your inbox.

Thank you for subscribing

Ship Salesforce changes faster
Teams on Flosum report 40% higher development velocity and 75%
fewer merge conflicts.
Free to start  |  No credit card required