Field history tracking in salesforce

Field History tracking is a method where we can track the changes that happens to a field. Thi field history tracking can be done for custom objects and standard objects.

How can we track certain field in Salesforce?

To track the changes that happened in the field, select the certain field to track and display field history in the history related list of an object. The field history data is retained for up to 18 months.

How to enable field history tracking in salesforce for Custom Objects?

 Field history tracking in salesforce can be enabled for Standard objects and Custom objects. To enable field history tracking for custom object or standard objects first we have enable feed for standard object or custom objects in Salesforce.

Step 1 :- Go to custom object Samples.

In this example we are going to enable field history tracking for the object samples. Open Sample object definition page and click on edit button.

ADVERTISEMENT
how to enable field history tracking in salesforce
  • Click on Edit button and go to Optional features
how to enable field history tracking in salesforce
  • Enable Track Field history for the object Samples.
how to enable field history tracking in salesforce
  • Click on Save button.

We have enabled field history tracking for the object Sample. Now we have to define which are the fields that to be tracked.

  • Now go to custom fields and Relationships | Set History Tracking.
how to enable field history tracking in salesforce
  • Click on Set History Tracking.
how to enable field history tracking in salesforce

Basically we can track upto 20 fields maximum. As shown above we are tracking field history for Pharma Product, Quantity and Sample code in the object. After adding fields we have to add related list in the page layout.

To add related list in the page layout go to any existing record in object and click on Edit Layout button.

how to enable field history tracking in salesforce

Now add related list to the page layout.

how to enable field history tracking in salesforce
  • Now go to related list.
  • Drag and Drop the sample history to related lists.
  • Click on Save button.
how to enable field history tracking in salesforce

To check field history tracking in Salesforce create any new record in sample and change the quantity field. Basically in this example we changed quantity field from 100 to 110. So it tracked the field as well as the old values and new values. These values are stored only for fields less than 255 characters.

Conclusion.

In this Salesforce Tutorial we have learned how to enable field history tracking in salesforce. In our upcoming Salesforce tutorial we will learn about setup Audit Trail in Salesforce.