While I was trying to deploy a copy of source code of production to a developer SB, with the Force.com migration tool, encountered the below error for a custom object with enableHistory = true in the source-source code (this is disabled in the target developer org).

Component Failures: 1. objects/breach__c.object -- Error: The entity: breach__c does not have history tracking enabled

Since I do have customObject tag defined correctly in the package xml, I haven't expect something like this. What am I missing here? what could cause this error?

Thanks in advance.

  • 1
    Is history tracking enabled on the object in the target org? Have you tried manually enabling it through the UI? There are some things the migration tool cannot do.
    – Nick C
    Dec 15, 2015 at 4:25
  • Yes Nick, I tried just tried it but the same result
    – Hasantha
    Dec 15, 2015 at 4:48
  • Disable the field history tracking in the source org. Refresh the XML again and try again deploying. There are some issues with the deployment when field history tracking is enabled.
    – Nitin
    Dec 15, 2015 at 6:05

2 Answers 2


This is caused by History Tracking being enabled in the source org, but disabled in the target org - or vice versa.

You either need to make them the same in both orgs, or else manually edit the xml to remove the history tracking related tags. If you don't deploy the tags, it won't disable it in the target, it simply deploys the bits you are interested in.

This is an issue we had to tackle at Gearset when building our deployment service. My colleague Luke wrote a blog post https://gearset.com/blog/salesforce-history-tracking-deployment-fix talking about how we address it.


First, deploy the object with tracking history enabled - on the object only. (true) set all in the fields to false. This will enable the Tracking History for this object in the destination org.

Then, deploy the original object xml file, with the tracking history fields - and it will succeeded.

  • The setting can be also set as a manual pre-deployment step, if that would work for your deployment setup
    – sskular
    Nov 25, 2019 at 10:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .