Activity › Forums › Salesforce® Discussions › How to resolve heap size limit exceeded issue in Salesforce? › Reply To: How to resolve heap size limit exceeded issue in Salesforce?
MemberAugust 6, 2020 at 2:22 pm
- Look for heap size in debug logs. If heap size is approaching the limit, investigate it and refactor the code.
- Use the 'Transient' keyword with variables.
- Use Limit methods.
- Reduce heap size during runtime by removing items from the collection as you iterate over it.
- Use SOQL for loops.