IS there a way in Apex to determine if a custom object has field tracking turned on? I dont care what the fields are I just need to know if the tracking is turned on
You can querry FieldDefinition table in Salesforce which will tell you which fields have history tracking enabled for which object.
eg. If I want to check what fields have history tracking enabled for Opportunity, my query will be
SELECT QualifiedApiName FROM FieldDefinition WHERE EntityDefinition.QualifiedApiName = 'Opportunity' AND IsFieldHistoryTracked = true
And the above query will return me the lists of fields on Opportunity where History tracking is enabled.
Note: Make sure your api version is 32 and Above as mentioned in above document FieldDefinition is only available after version 32.