This is solved for me but I am posting in case anyone else runs into it. It was a beginners error back in the day that just reared its head. I have a page include with one model where the SObject Type is Attachment. I was surpassing the JSON heap size limitation and the page was crashing. After some trial an error I think I have figured out my issue. Basically, I included the field “Body” and if I loaded over 10 records the heap size was surpassed. Once I removed the body field from the model I was fine. I believe this is because Body is the attachment in binary so it can be rather large almost like loading the attachments into the page instead of just the links to the attachments.
Why did I load the body? I was new and experimenting with which fields displayed what and never removed it from my model when I was learning. Bottom line don’t include the field “Body” on your attachment objects.
Question
Heap Size Limit Attachments Object
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
