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
Donald Reagan 3Donald Reagan 3 

AccountHistory not deleting immediately after an update

I'm facing an AccountHistory delete problem almost exactly the same as https://salesforce.stackexchange.com/questions/210984/accounthistory-not-deleting-immediately-after-an-update. Has anybody else faced this problem? Any ideas?
Best Answer chosen by Donald Reagan 3
Abhishek BansalAbhishek Bansal

Hi Donalad,

As suggested in the link mentioned by you, the History records are not available till the transaction is fully completed. If you want to make sure those records are available for deletion, use a @future method, instead.
Please let me know if you need any further help or information on this.

Thanks,
Abhishek  Bansal.