You need to sign in to do that
Don't have an account?

Exception on retrieving Custom Settings - Row with duplicate Name at index 1
Hi,
We have a managed package which uses Custom Settings and we are getting the exception "Row with duplicate Name at index 1" when the code is trying to pull back all of the settings - here is the code:
We have seen there was a similar issue on sandboxes before but this is in a production org.
How would a duplicate have gotten in? Any idea how we can fix this?
We have a managed package which uses Custom Settings and we are getting the exception "Row with duplicate Name at index 1" when the code is trying to pull back all of the settings - here is the code:
List<Our_Custom_Setting__c> settings = Our_Custom_Setting__c.getall().values();
We have seen there was a similar issue on sandboxes before but this is in a production org.
How would a duplicate have gotten in? Any idea how we can fix this?
Not sure if I am honest but perhaps during the instal of the managed package, it is creating a dupliacte custom setting? I would have thought this to be unlikly as the managed package settings are typically named quite well. In any case, you will have to remove the dupliacte otherwose you will continue to face this issue.
Please remeber to mark this thread as solved with the answer that best helps you.
Kind Regards
Stephen
As a clue, I seem to be getting this when I have batch processes interacting with my custom settings.