How to fix the heap Size issue in Batch Classes

something like this, assuming updating an account is what triggers your code above. global class Trades_CascadeAccountsBatchable implements Database.Batchable<sObject>, Database.Stateful { /*run this batch the first time with this Database.executeBatch(new Trades_CascadeAccountsBatchable(‘SELECT id FROM Account WHERE Number_Of_Trades > XXXX’,’Trades_CascadeAccountsBatchable run 2′), 1);…

Read More