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
sfdctrrsfdctrr 

Opportunity error after adding attachments

Hi Folks,

                     I have opportunity for which in Notes and Attachments related list added 3 attachments, each of  which is 4.5MB(So total file size is 13.5MB), Now the stage for that opportunity chaged to 'closedWon', while saving it throws following exception

 

System.LimitException: Query of LOB Fields caused heap usage to exceed limits

 

 For other opportunity i have added 2 attachments, and size is 4.5MB and 400kb so which is around 5MB, then when i change the stage to'ClosedWon'  and save it, get saved success fully with out any isses.

 

So i guess The max size for all attachments shouldn't exceed 5MB for any object.  So how can i handle files which has size morethan 5mb. Is there any way to do it or its not possible in salesforce?

 

Please let me know, any suggestion/thoughts appreciated.

 

Thanks.

bob_buzzardbob_buzzard

There's been a couple of posts around this,  e.g.

 

http://boards.developerforce.com/t5/Apex-Code-Development/Query-of-LOB-fields-Exception-heap-usage-to-exceed-limit/td-p/347241

 

Might be worth taking it up with support, as it sounds like this is something introduced in Winter 12.

sfdctrrsfdctrr

Hi Bob,

               Is there any way to add multiple attachments(more than 5MB) to the opportunity for this release ot have to wait for next release.

 

Thanks.     

bob_buzzardbob_buzzard

I haven't actually experience this myself, so I can't provide much more info I'm afraid.  I haven't seen anything to indicate that this is a bug that will be fixed, but I've not raised it with Salesforce.