Field history tracking - retrieve and deploy

How to retrieve and deploy field history tracking using Gearset

Dario Messina avatar
Written by Dario Messina
Updated over a week 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!

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?