Blog16.4K views2,313 votes0 replies4,937 following
Keep Running Totals in Salesforce Batch Apex with Database.Stateful
Learn how Database.Stateful preserves instance variables across Batch Apex chunks, with a worked counting example and heap limits to watch.