In this Salesforce tutorial, we are going to learn about enabling or setup a Field History tracking in Salesforce Lightning and Classic editions. We will discuss setting field history tracking for standard and custom objects in both editions. We will learn about the Field History Tracking feature and its uses in Salesforce.
There are some considerations for using field history tracking and we will discuss that also. To track history tracking in custom objects, we will create a custom object from scratch to enable and set up field history tracking.
While working as a system administrator for an organization that uses Salesforce as its primary CRM tool, I was asked to set field history tracking for the standard “Opportunity” object to track specific field changes related to sales team activity and opportunity updates. So I decided to set field history tracking by editing the settings of the object.
Field History Tracking in Salesforce
In Salesforce Field History Tracking is a feature that allows us to track the history of the modifications and changes made in the specific fields of objects. In enabling field history tracking, we select specific fields in the objects to set up the field history tracking. Every object has a limit for the number of fields to set up field history tracking.
We can track the field history of the following Standard and Custom objects in Salesforce.
- Accounts
- Articles
- Assets
- Campaigns
- Cases
- Contacts
- Contracts
- Contract Line Items
- Crisis
- Employees
- Employee Crisis Assessments
- Entitlements
- Events
- Individuals
- Internal Organization Units
- Knowledge
- Leads
- Opportunities
- Orders
- Order Products
- Products
- Price Book Entries
- Quote
- Quote Line Item
- Service Appointments
- Service Contracts
- Solutions
- Tasks
- Work Orders
- Work Order Line Items
Considerations
We have to consider the following points while using field history tracking in Salesforce.
- We cannot track the field history of the fields that we edited or added prior to enabling field history tracking.
- The changes made in the fields with more than 255 words like the Long text field can’t record the old value and new value.
- If two users update the same tracked field on the same record at the same time, both updates have the same timestamp. The order of these changes to the database can be random and this can result in display values looking out of order.
- In case, you have to retrieve field history that is older than 1.5 – 2 years, use Data Loader or the queryAll() API to retrieve or track field history.
- A field history tracking record cannot be deleted.
- In tasks and Events, we can set up field history tracking for a maximum of 6 fields.
- Unlike Salesforce Lightning, the history list of tracking is not available in Salesforce Classic.
- There is a limit to setting field history tracking for up to 20 fields for each standard and custom object.
- Object fields having decimal values, like currency and percent, are not supported to be displayed in history tracking.
Field History Tracking Setup for Standard Objects
To Set up Field History Tracking for Standard Objects we will edit the settings of existing standard objects. In the examples, I have selected the object Opportunities, and you can follow the same procedure to set up field history in any standard object.
Set Up Field History Tracking for Standard Objects in Salesforce Lightning
To set up Field History Tracking for Standard Objects in Salesforce Lightning, navigate to the Setup page of Salesforce Lightning and follow the below.
1. On the Setup page of Lightning, click on the Object Manager tab.