Loading
Prepare for Email to Become the Default Login ExperienceRead More
Multiple Salesforce Services Impacted - Support Case Creation Also AffectedRead More
Intermittent freezing when using using certain browser versionsRead More
Set Up and Maintain Your Salesforce Organization
Query Batches of Archived Field History Data

Query Batches of Archived Field History Data

You can query Field Audit Trail entries stored on the FieldHistoryArchive object.

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 return a large number of results, use a URI query.

/services/data/vXX.X/jobs/query

Here’s an example Post request.

{
    "operation": "query",
    "query": "SELECT ParentId, FieldHistoryType, Field, Id, NewValue, OldValueFROM FieldHistoryArchive WHERE FieldHistoryType = ‘Account’ AND CreatedDate > LAST_MONTH"
}

For more information about Bulk API queries, read Get Results for a Query Job in the Bulk API 2.0 and Bulk API Developer Guide.

You can also make a CURL request.

curl --include --request GET \
--header "Authorization: Bearer token" \
--header "Accept: text/csv" \
https://instance.salesforce.com/services/data/vXX.X/jobs/query/750R0000000zxr8IAA/results ?maxRecords=50000

These examples result in a CSV file that you can examine for auditing purposes.

 
Loading
Salesforce Help | Article