Student Scheduling - Delay changes until a future date
Available from v3.20
Table of Contents
A new setting called Allow Future Scheduling has been added to the Student Scheduler. This setting adds extra features to the Student Scheduler, allowing you to delay any student enrollment/unenrollment updates so changes don't appear on records or calendars until a specified date.
Please note, we only support Future Scheduling for Session Connections at this time.
Setup
Student Scheduler
You will need to enable Allow Future Scheduling on the Student Scheduler.
How to enable:
- Go to the Student Scheduler page
- Click Edit Page
- Click the Student Scheduler component on the page
- Scroll through the list of variables on the right, and enable Allow Future Scheduling
- Save the page, and Activate if necessary
Apex Scheduled Job
This new feature relies on an Apex Scheduled Job to find any future scheduled changes, and update the records. This job needs to be manually scheduled by an administrator.
How to schedule:
- Go to Setup > Custom Code > Apex Classes
- Click the Schedule Apex button
- Input the following information:
- Job Name: REDU Future Student Scheduling
- Apex Class: SECN_ScheduledEnrollment_SCHED
- Schedule using: Schedule Builder
- Frequency: Weekly (every day)
- Start: [Today]
- End: [100 years] - We can't tell a job to run infinitely using this method. If you still need to run the job 100 years later, you can come back and update the end date even later.
- Preferred Start Time: 12:00AM
- Save

Feature Information
Student Scheduler Features
With Allow Future Scheduling enabled, you will see some new features available in the Student Scheduler.
When assigning or removing students from Sessions, you will see a new radio-select option to Schedule the change for the future. This will allow you to choose the date for the change to take place, and specify the Enrollment status, if necessary.

Warning regarding future Available Places
Because the change is taking place in the future, we cannot guarantee there will be enough available places to enroll when the date arrives. Whatever status is set in the confirmation window will be applied, even if this causes the Session to become overbooked. It is up to the user to ensure there are enough available places, or to set the status to Waitlisted if necessary.
Also for this reason, it is NOT recommended to use this feature while also allowing students to enroll into Sessions themselves with the community's enrollment wizard.
A new button has also been added to the button menu, allowing users to view all Scheduled Enrollments for a Session, and update them if needed.
If a student has a scheduled enrollment date AND a scheduled unenrollment date, they will appear as two separate lines in this view. Deleting the scheduled enrollment in this case will also automatically remove the scheduled unenrollment.

Technical Information
Session Connection fields
The following fields have been added to the Session Connection object to store future scheduling information. These will automatically be populated by the Student Scheduler, and the scheduled job. The scheduled job will read the information from these fields to determine if a record needs to be updated, and will then input the appropriate dates and enrollment status on the main Session Connection fields.
These 3 fields store the information for adding a student to a Session:
- Scheduled Start Job Status
- Scheduled Start Date
- Scheduled Start Enrollment Status
These 3 fields store the information for removing a student from a Session:
- Scheduled End Job Status
- Scheduled End Date
- Scheduled End Enrollment Status
This field stores information about the completion of either of the scheduled jobs:
- Scheduled Job Notes
SECN_ScheduledEnrollment_SCHED - Scheduled Apex details
Every time the SECN_ScheduledEnrollment_SCHED class runs, it will perform the following actions:
- It will find every Session Connection that matches the following criteria:
- Scheduled Start Job Status = “Scheduled”, and Scheduled Start Date ≤ Today's date
- OR
- Scheduled End Job Status = “Scheduled”, and Scheduled End Date ≤ Today's date
- For each Scheduled Start Job Status match, it will update the Session Connection with the following information:
- Start Date = [Scheduled Start Date]
- Enrollment Status = [Scheduled Start Enrollment Status]
- Scheduled Start Job Status = “Completed”
- Scheduled Job Notes will be appended with the current time, and a message saying the Enrollment automation completed.
- For each Scheduled End Job Status match, it will update the Session Connection with the following information:
- End Date = [Scheduled End Date]
- Enrollment Status = [Scheduled End Enrollment Status]
- Scheduled End Job Status = “Completed”
- Scheduled Job Notes will be appended with the current time, and a message saying the Enrollment withdrawal completed.
- If any of these Session Connections fail to update, we will instead try to update the Session Connection with the following error information:
- Scheduled Start/End Job Status = “Error”
- Scheduled Job Notes will be appended with the current time and the error
- If AGAIN these Session Connections fail to update, we will create a new hed__Error__c record for error logging each failed record:
- Context Type = “SECN_ScheduledEnrollment_BATCH Record Error”
- Object Type = “rio_ed__Session_Connection__c”
- Datetime = [Current time]
- Record Id = [Session Connection Id]
- Full Message = [Error message]