Field Audit Trail
Field Audit Trail extends the capabilities of Field History Tracking, so you can keep field history data indefinitely. Use Field Audit Trail to maintain a comprehensive historical record of field changes (up to 200 tracked fields per object) and to ensure data integrity and compliance with industry standards. Field History Tracking data and Field Audit Trail data don’t count against your data storage limits.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Performance, and Unlimited Editions with the purchase of Salesforce Shield or Field Audit Trail licenses. |
To capture field history data by using Field Audit Trail, first enable Field History Tracking for objects and for specific fields on those objects. When you enable Field History Tracking, changes that occur in tracked fields are recorded in the object’s related history object (for example, when you make changes to an account field, those changes are saved in the AccountHistory object) and these changes appear on the object’s history related list. After you define and deploy a Field Audit Trail policy, Salesforce copies the field history from the object’s history list to the FieldHistoryArchive big object. The first copy takes a long time, because it saves all the field history defined by your policy to the archive storage. Subsequent copies are faster, because they transfer only the changes since the last copy.
| Field History Tracking | Field Audit Trail | |
|---|---|---|
| Fields Tracked | Up to 20 per object | Up to 200 per object |
| Retention Period | 18-24 months | Until deleted |
| Storage | The object's history object | FieldHistoryArchive |
| Access | UI and API | API only |
The FieldHistoryArchive big object stores all archived field history changes. For each tracked object, you can also define a field history data retention policy in the HistoryRetentionPolicy object that specifies the number of months that you want to retain field history in your system. You can include these policies in both managed and unmanaged packages.
You can define field history retention policies for these objects:
- Accounts, including Person Accounts
- Assets
- Authorization Form Consent
- Campaigns
- Cases
- Communication Subscription Consent
- Contacts
- Contact Point Consent
- Contact Point Type Consent
- Contracts
- Contract Line Items
- Crisis
- Employee
- Employee Crisis Assessment
- Entitlements
- Individuals
- Internal Organization Unit
- Leads
- Net Zero Cloud objects
- Opportunities
- Orders
- Order Products
- Party Consent
- Price Books
- Price Book Entries
- Products
- Service Appointments
- Service Contracts
- Solutions
- Work Orders
- Work Order Line Items
- Custom objects with field history tracking enabled
You can’t track these fields:
- Formula, roll-up summary, or auto-number fields
- Created By and Last Modified By
- The Expected Revenue field on opportunities
- The Master Solution Title or the Master Solution Details fields on solutions
- Long text fields
- Multiselect fields
You use Metadata API to define and deploy your field history retention policy. After you deploy your field history retention policy to a production environment, you can query Field Audit Trail entries stored on the FieldHistoryArchive big object. See Query Batches of Archived Field History Data.
When you delete field history archive data, use REST API, SOAP API, or Tooling API. If you delete a record in your production data, the delete cascades to the related history tracking records, but Salesforce doesn’t delete the history copied into the FieldHistoryArchive big object. For information about deleting data in FieldHistoryArchive, see Delete Field History and Field Audit Trail Data.
For information about enabling Field Audit Trail, contact your Salesforce representative.
- Query Batches of Archived Field History Data
You can query Field Audit Trail entries stored on theFieldHistoryArchiveobject.
See Also
- Learning Map: Shield Learning Map
- SOAP API Developer Guide: FieldHistoryArchive
- Metadata API Developer Guide: HistoryRetentionPolicy
- ISVforce Guide: Use Managed Packages to Develop Your AppExchange Solution
- Lightning Platform SOQL and SOSL Reference: SOQL with Archived Data
- Big Objects Implementation Guide: Async SOQL

