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
Lauren_HLauren_H 

field history tracking

We need to be able to limit the amount of time that field history records data for. On the lead object, we would like to track history for 6 months and then the data is removed. We don't have development staff, but I can write a bit of apex. Can anyone let me know if they think we can accomplish this with code? Thanks so much! Lauren
James LoghryJames Loghry
 I don't think you can delete field history records currently.  I could be wrong here.

However, this SSE post: http://salesforce.stackexchange.com/questions/12459/track-field-values-over-time suggests you can use Analytic Snapshots to get an idea of Field History over a certain period of time.  Maybe that will help?

Furthermore, there is a pilot out for "Field History Retention" https://help.salesforce.com/help/pdfs/en/field_history_retention.pdf See if you can get on that pilot, and that should help your use case.