Skip to main content
How to deploy Field history tracking

How to retrieve and deploy field history tracking using Gearset

Dario Messina avatar
Written by Dario Messina
Updated over 3 months ago

Prerequisite

To start with, make sure you have enabled history tracking on your custom or standard object, and that you have selected the fields you want to be tracked.

Retrieving field history tracking with Gearset

In Gearset, you'll see the enabled history tracking under the CustomObject metadata type, as shown on screenshot below.


And the trackHistory enabled on the Custom field level. We can see it in the object view in the comparison results:

And in the XML view:


Deploying field history tracking with Gearset

Deploying trackHistory with Gearset is as easy as selecting it on the CustomField you want to track, and clicking on Next and then Deploy Now on the summary page.

However, if you don't have the history tracking enabled on your target org, your validation is likely to fail with the validation error:
"The entity: Account does not have history tracking enabled "

To avoid this, Gearset has built a suggestion on the Problem Analyzer, which allows you to enable the history tracking for the parent object by adding the CustomObject to the deployment package:

By accepting the Problem Analazer's suggestion, or by simply including the change in CustomObject (when adding items to the deployment package on the comparison page), your deployment is likely to validate successfully!

Is it possible to track history on Activity object?

Currently, it's not possible to track history on fields created in Activity object due to the limitation of Metadata API.

We tested this by creating fields on Activity object and enabling tracking in Event and Task standard objects, but it did not show up both in Gearset and Workbench comparisons.

If you are still struggling with retrieving and deploying field history tracking, feel free to reach out to us in the in-app chat. We'll be happy to help.

Did this answer your question?