Activity Forums Salesforce® Discussions How to resolve heap size limit exceeded issue in Salesforce?

  • How to resolve heap size limit exceeded issue in Salesforce?

    Posted by Anjali on August 6, 2020 at 1:29 PM

    How to resolve heap size limit exceeded issue in Salesforce?

    Deepak replied 6 years ago 2 Members · 1 Reply
  • 1 Reply
  • Deepak

    Member
    August 6, 2020 at 2:22 PM
    1. Look for heap size in debug logs. If heap size is approaching the limit, investigate it and refactor the code.
    2. Use the 'Transient' keyword with variables.
    3. Use Limit methods.
    4. Reduce heap size during runtime by removing items from the collection as you iterate over it.
    5. Use SOQL for loops.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Pros & Cons of Lightning Component vs. 3rd party frameworks in Salesforce UI development

Video in

Nikita drops by to share his invaluable experience of using popular 3rd party frameworks in Salesforce. http://media.blubrry.com/salesforceway/audio.xmcdn.com/group42/M05/25/57/wKgJ81rXk6XjaZIAAU_I_KtprFM998.m4a