When using the Staff Calendar to print a document of Appointments Grouped by Staff , you might see this error if Appointments are Not Assigned to a Rep:
javax.faces.FacesException: core.apexpages.exceptions.ApexPagesGenericException: common.apex.runtime.impl.LimitException: Apex heap size too large: 24073061
Rather than generating a PDF document listing Appointment by Staff, you may see this error:
Issue
The 'Not Assigned' staff option is selected when trying to generate an 'Appointments by Staff' document. The system cannot query a staff member on these records, which is causing an error.
Resolution
Remove 'Not Assigned' from the selected view, and follow same steps With 'Not Assigned' unselected, the document will generate successfully.