function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How to flush the history fields

Hi all,


When you track historical changes in Salesforce they are stored in a table that (apparently) can´t be  accessed to delete the records. However, if you inactivate history tracking and reactivate it, the changes prior to the deactivation are still visible.


So the question is: how can you get rid of these? flush that history table to free up some space and also to get rid of updates that happened during an import?





There isn't a way to delete records from the history table -- which makes sense since it is an audit / compliance feature. The only way to clear everything would be to copy / clone the record and delete the original.

Hi Mark,


Thanks for the info. I knew about the "Delete" and "Recreate" approach but was trying to avoid it... I don´t want to delete 10K records and recreate them... too risky... I think there is some use in being able to flush this table.