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

  • 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