RIO Ready: Update Term Fee Functionality
Table of Contents
Use Case
At some universities, the fee rate is decided after students have enrolled in course offerings. This process typically requires significant manual work to update the fee schedule term for each course offering and the fee amount for every course enrollment.
This RIO Ready simplifies this by allowing users to update the fee schedule term for all course offerings under a specific term and the fee amount for each course enrollment linked to those offerings.
Update Term Fee
After setting up the fee, fee schedule, and fee schedule term, the user can navigate to the desired term and click the Update Fees Rate button. A confirmation message will be prompted to the user before proceeding.
When the user selects Yes, the flow will pass the term ID to an invocable Apex class. This class will query all course offerings under the term and pass the course offering IDs to a batch class. The batch class will update each course offering to populate the Fee Schedule Term field and unlinking and relinking the course offering to each course enrollment, allowing the Fee Amount field to be populated.
The Fee Update Status field on the term record indicates the status of the process. If the status is Failed or Completed with Error, the issue might have occurred during the update of a course offering or a course enrollment. Error logs will be created under the respective course offering for each record that caused an error, and all records in the same batch will be rolled back.
What's included
Fields:
- Fee Update Status (Term Object): To indicate the status of the asynchronous job for updating fees with the new rate
- Update CO Fees Batch Size (RIO Education Setting (Custom Setting)): To determine the batch size for processing in the REDU_UpdateCourseOfferingFees_BATCH
Screen Flow:
- Screen flow with a confirmation message that passes the Term ID to an invokable class
Button (Action):
- A custom button under Term object name ‘Update Fees Rate’ that allow user to trigger a screen flow with a confirmation message that passes the Term ID to an invokable class.
Apex Classes:
-
REDU_CourseOfferingQuery_FLOW
- Invocable class used to receive the Term ID from the Flow and query all Course Offerings with the same Term that have an empty Fee Schedule Term.
-
REDU_UpdateCourseOfferingFees_BATCH
- Batchable class that receives a list of qualified Course Offering IDs from the above class. It will initiate a save point, trigger updates to the Course Offerings without actually modifying any fields, and query and update all related course enrollment records.
To set this up, you can follow the steps here.