I have a table (opportunity line items) with two filters (opportunity record type, and opportunity probability), 7 sortable fields, which pulls through less than 1500 records. The table opens as a popup when a button is clicked.
When I sort the table on any field with no filters on, 1325 records load without issue.
When I sort any field in the table with record type filtered to any value, I face no issue.
When I filter of the probability field, a numeric range filter type, I seem to run into some issues.
If the probability is between 10 and 90. All records are returned and I can sort on any field with no issue.
If the probability is between 11 and 70. All records are returned and I can sort any field with no issue.
If the probability is between 11 and 69. I get an error “Filter could not be applied. Apex heap size too large”
If the probability is between 20 and 60 . I get an error “Filter could not be applied. Apex heap size too large”
If the probability is between 30 and 60. All records are returned and I can sort any field with no issue.
I’m really struggling to understand how to debug this error. Any ideas for me on what could be causing the problem, or any steps I can take to to debug the error (I’m a button click Salesforce admin)
Question
Apex heap size too large (when querying less than 1500 records) in a table
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.



