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.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how Database.Stateful preserves instance variables across Batch Apex chunks, with a worked counting example and heap limits to watch.
When you need to move millions of old Account records out of the active database, Batch Apex lets you break the work into chunks, stay under governor limits, and keep the org responsive. Learn how to write, run, and monitor a batch that archives inactive accounts in Salesforce.
A decision guide for choosing between Salesforce Flow and Apex when automating complex business logic. Covers constraints, a comparison table, trade-offs, a hybrid implementation pattern using Invocable Methods, and a validation protocol using Data Loader and Debug Logs.
A technical guide for Salesforce engineers deciding between Salesforce Flow and Apex, covering governor limits, bulk processing constraints, and architectural trade‑offs.
Learn how to stay within Apex DML and heap limits by batching records, using savepoints, and choosing between Batch Apex and Queueable for large data jobs.
An architecture note on securing a small internal Oracle APEX CRUD app with authorization schemes, narrow parsing-schema grants, and operational checks—without over-engineering.
Learn how to move heavy trigger work into an Apex Queueable job to stay within synchronous governor limits while reliably updating related records.
Learn how Salesforce Batch Apex splits large datasets into chunks, the best‑practice workflow, a hands‑on example, and key trade‑offs that can save you from hitting governor limits.
SOQL OFFSET degrades linearly per page and caps at 2,000 rows. Keyset pagination with an Id cursor keeps per-page cost flat — here's a working Apex implementation and its one critical requirement.