You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Older and super similar Github Issue referencing the CPU consumption and Collection Error: #26
Issue:
Customers may run into CPU Timeout errors or Collection Size Errors if Too Many Volunteer Job records are pulled into the Mass Edit Volunteer Hours Page or if customers have other automations running on top of V4S which run on save.
Apex CPU time limit exceeded
Error is in expression '{!SaveVolunteerHours}' in component <apex:commandButton> in page
gw_volunteers:volunteersbulkenterhours: Class.npsp.TDTM_Runnable.DmlWrapper.<init>: line 144, column 1
Class.npsp.TDTM_TriggerHandler.run: line 79, column 1
Class.npsp.TDTM_Config_API.run: line 92, column 1
Trigger.npsp.TDTM_Campaign: line 33, column 1
For Dev/QE: feel free to use the Snowfakery file attached to the Work Item. It will create a Campaign, Volunteer Job, 995 Contacts, and 995 Volunteer Job records in your org. I’m using 995 here since 5 empty rows are loaded on the page. If more than 1000 rows are created on the page, we run into a Visualforce limit for collection size.
Otherwise:
Create a Campaign where the Status is Active.
Create a Volunteer Job record
Create 995 Contacts.
Create 995 Volunteer Hour records for those Contacts and relate them to the Volunteer Job.
Go to the Volunteer Job detail page and click the “Mass Edit Volunteer Hours” button on the Volunteer Hours Related List.
Change the Status for just 1 row and click save.
The controller will attempt to update all 995 records and will hit a CPU Timeout error.
Workarounds:
Use filters to reduce the amount of Volunteer Jobs displayed on the page.
Follow Best Practices around automation, especially around Volunteer Hours, Volunteer Job, and Contact objects. (i.e. 1 automation type per object / use before update flows instead of after update flows when relevant / etc.)
The text was updated successfully, but these errors were encountered:
Older and super similar Github Issue referencing the CPU consumption and Collection Error: #26
Issue:
Customers may run into CPU Timeout errors or Collection Size Errors if Too Many Volunteer Job records are pulled into the Mass Edit Volunteer Hours Page or if customers have other automations running on top of V4S which run on save.
Apex CPU time limit exceeded
Root Cause
When the SaveVolunteerHours() method is called within the VOL_CTRL_VolunteersBulkEnterHours class, we update all Volunteer Job records that were passed into the Visualforce page. There’s a comment within the code indicating this was intentional , though we attempted to implement logic at one point to determine which records were updated:
https://github.com/SalesforceFoundation/Volunteers-for-Salesforce/blob/master/src/classes/VOL_CTRL_VolunteersBulkEnterHours.cls#L301-L310
Steps to Repeat:
For Dev/QE: feel free to use the Snowfakery file attached to the Work Item. It will create a Campaign, Volunteer Job, 995 Contacts, and 995 Volunteer Job records in your org. I’m using 995 here since 5 empty rows are loaded on the page. If more than 1000 rows are created on the page, we run into a Visualforce limit for collection size.
Otherwise:
Workarounds:
The text was updated successfully, but these errors were encountered: