**Update Oct 23 2013: The fix to Known Issue W-1890544 is now being rolled out to sandboxes. I just verified by creating a brand new sandbox and I'm now able to insert new records into "Hierarchy" type Custom Settings. Case closed - for now :)
**Update Oct 18 2013: SFDC just posted this specific issue as a Known Issue as ID W-1890544. Please make sure you "vote" for it by clicking the "This Issue Affects me" button.
**Update Oct 17 2013: This issue just showed up again with the Winter '14 release. Most likely this is connected to known issue W-1795057. I've had support fix this the issue for me in a Developer sandbox by running a backend cleanup script specific to my sandbox. My personal theory is that the custom settings are semi-copied to the sandbox but aren't visible in the app itself, causing a unique constraint violation on the database level when you attempt to add your own records into the (to you) empty Custom Setting. The script they run removes those dangling rows in the database. If you need support to run the same for you, you could refer them to my support number (09759274) and that case should contain enough info to run the same for you. If I get a better bug tracking ID I will update here.
**Update Oct 18 2012: A fix was deployed last night and this is now working as expected.
For reference, the Known Issues site had this listed as W-1413524 and it's now marked as Fixed.
I just created a new Developer sandbox and, as always when I create a sandbox, I need to fill it up with some data. Part of this data resides in Custom Settings and are used by our application(s) to function properly.
Today, I'm unable to insert new Custom Setting records into the "Hierarchy" type custom settings. When I try to set up the default values for those it errors out saying...
duplicate value found: SetupOwnerId duplicates value on record with id: 123456789
...where 123456789 is the sandbox's Org ID.
I even created another sandbox just to test this and it shows the same exact behavior.
This has worked flawlessly in the past, whenever I created a new sandbox. Is it just me or is this a known issue? I browsed the Known Issues site without finding anything on this topic.
How to replicate the problem:
- (If you don't already have one, create a new Custom Setting of type Hierarchy in Production)
- Create a new sandbox
- Log on to the new sandbox
- Go to Setup >> Develop >> Custom Settings
- Click Manage next to one of the hierarchy type custom settings
- Click New at the top of the page to add a new default
- Click Save and the error message occurs