System.ListException: Row with duplicate DeveloperName
Table of Contents
Description
When attempting to create or update a Program Application, you run into the following error that prevents saving the record.
rio_ed.TDTM_ProgramApplication: execution of AfterInsert caused by: System.ListException: Row with duplicate DeveloperName at index: 6 Class.rio_ed.REDU_Helper_UTIL.getPrenWithdrawnValues: line 2140, column 1 Class.rio_ed.PRAP_CreateEnrollment_TDTM.upsertProgramEnrollment: line 171, column 1 Class.rio_ed.PRAP_CreateEnrollment_TDTM.run: line 133, column 1 (System Code) Trigger.rio_ed.TDTM_ProgramApplication: line 13, column 1
Solution
When there is an error with the phrase “ System.ListException: Row with duplicate DeveloperName ” , this typically refers to duplicate values for custom setting or custom metadata.
You will need to find what other TDTM or apex class is being referenced in the error message.
In the example above, the apex class PRAP_CreateEnrollment_TDTM is mentioned.
Creating a Program Application and changing its status may create a Program Enrollment, depending on how the Program Enrollment Statuses custom metadata is set up.
Thus, you will need to check the Program Enrollment Statuses custom metadata and make sure there are no duplicates.
Note that the above is just 1 example, but this error message typically points to this type of issue.
For other non RIO Education examples, see this online forum discussion here.