[SalesForce] Query of LOB fields caused heap usage to exceed limit

I understand that this has been asked many times before. But I haven't been able to find a conclusive answer or guide to solve the issue.

When we add a new product to an opportunity we get the following error.

Apex trigger npsp.TDTM_Opportunity caused an unexpected exception, contact your administrator: npsp.TDTM_Opportunity: System.LimitException: Query of LOB fields caused heap usage to exceed limit.

This has only just recently started occurring after 12-months of usage – and the person who originally developed this for us is not longer available.

As a not-for-profit, we can't exactly go out and find another developer to amend this for us, so any help would be greatly appreciated.

Best Answer

As sfdcfox mentions, the Power of Us Hub is the best resource for NPSP support -- it's a very active community of NPSP users, consultants and the actual NPSP developers in the Salesforce Foundation.

There was a post about this error just last month. In their case, it was related to a large NPSP error log, so they purged the log (NPSP Settings > System Tools > Error Notifications) and the error went away. Apparently, inserting an opp causes a query on the error log object and that was causing their heap error.

Related Topic