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
BhawnaBhawna 

How to reduce Heap Size()......???

Hi,

I’m facing problem of Heap Size (). Actually what I’m fetching the no. of Attachments and create new Attachment s…. While doing so the Heap Size increases and cross the Governor limits… and produce an error message.

I found that while fetching all the fields of Attachments; no. of size is 80 only but Heap Size increased…

And if I execute the query on Attachment without its Body field Size remains the same and Heap Size also reduced; create the new Attachments.

It means that Heap Size is increase due the Body Field in Attachment…. So please anyone Help/Guide me to overcome the Error of Heap Size (). :smileyhappy: