Gaurav Kumar (Accenture) asked in #ApexMar 31, 2021, 9:47 AMApex heap size too large: 39897844HI All,I am trying to write a trigger on object1 i.e after insert/ after update to create record on object2. But I am getting error (Apex heap size too large: 39897844) on saving record on object1.Thanks in advance. 3 answersSortSort by DateSort by Most HelpfulSort by DateLoad more comments...Geoffrey BOct 7, 2025, 10:08 AMTry using these methods to find how much heap is consuming in your code. limtis.getHeapSize(); limtis.getLimitHeapSize();
Geoffrey BOct 7, 2025, 10:08 AMTry using these methods to find how much heap is consuming in your code. limtis.getHeapSize(); limtis.getLimitHeapSize();