Can the tooling API turn off/on field tracking history? Seeing as we can't delete history record I want to be able to turn it off before a process runs to prevent history records being created.

The tooling API is new to me and I can see there is the IsFieldHistoryTracked for EntityDefinition - - I just can't figure out if it's possible to edit via the tooling API.

Background: Basically we need to be able to clear address data on sandbox creation - however the original remains in the associated history records.

  • 1
    You could use a metadata api call instead, as detailed in this answer. – battery.cord Mar 15 '17 at 16:32
  • The linked question works with CustomField via the Metadata API. You can get to the same record in the Tooling API. It looks like the trackFeedHistory is accessible through the Metadata field. – Daniel Ballinger Mar 15 '17 at 20:07
  • Any reason I should use one over the other? – Girbot Mar 15 '17 at 20:14

Thanks for the comments that helped me look at the right place...

With the help of Andrew Fawcett's Metadata API and in particular the demo metadatadeply.vfp I can confirm that the metadata API can turn off/on field history for an object.

I edited the zip file to update the Account object and to include:


Salesforce maintains what fields have field tracking enabled when it is turned off at the object level, so turning it on/off at the object level is all I need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.