Triggering error - Cannot update locked Fee Line
Cannot add Fee Line to locked Student Fee
Table of Contents
Description
Error Message: FIELD_CUSTOM_VALIDATION_EXCEPTION:Cannot add Fee Lines to a locked Student Fee
This error happens when the user is:
- updating a Fee Line record that is locked OR
- updating a record that triggers an update to the Fee Line record that is locked
Reading material: Locking/unlocking Student Fees
Resolution
The direct solution is to manually unlock the Fee Line. However, one must verify if the update is intended before unlocking the Fee Line.
For scenario #2, the common use case is:
Use Case #2.1 when updating a Course Connection also triggers an update to the Fee Line. This only happens when the following conditions are met.
Course Connection field value changes in:
- Course Offering (hed__Course_Offering__c)
- Enrollment Status (rio_ed__Enrollment_Status__c)
Fee Line will be updated if these fields are different between the Course Connection-Fee Line records:
- Fee Amount (rio_ed__Fee_Amount__c)
- Upfront Payment (rio_ed__Upfront_Payment__c)
- FEE-HELP Amount (rio_ed__Funding_Assistance_2__c)
Use Case #2.2, when updating a Course Connection the process will trigger a creation of Fee Line. This only happens when the following conditions are met.
Course Connection field value changes in:
- Enrollment Status (rio_ed__Enrollment_Status__c) to Enrolled
Fee Line will be created if there is no match is found between these records:
- Course Connection: Id + rio_ed__Fee_Id__c
- Fee Line: rio_ed__Course_Connection__c + rio_ed__Fee_Id__c