Getting "Apex CPU time limit exceeded" error in Enrollment Wizard
Table of Contents
Description
When you set up a new program and complete the necessary configuration, but there are some minor issues, you may encounter the following error when navigating to the Enrollment Wizard:
Resolution
Check all the the Requirement Logic under Plan Requirements
Make sure all the Requirement Logic does not have any typos such as missing brackets.
The best way to check all the Requirement Logic is to use a list view, select the Requirement Logic field to display, and verify if there are any mistakes.
Or you can run a query, such as the example below, to list all the plan requirements under a specific program plan and verify if there are any mistakes.
SELECT Id, rio_ed__Requirement_Logic__c FROM hed__Plan_Requirement__c WHERE hed__Program_Plan__c = '{Program Plan Id}' |
Future Prevention
To prevent issues due to missing brackets, a validation rule like the one shown in the image below could be implemented in the Plan Requirement object.
It will check if the number of opening brackets matches the number of closing brackets. Please note that this validation rule will only ensure that every opening bracket has a corresponding closing bracket; it cannot ensure that the brackets are placed in the correct positions.