13


**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.
Background
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.

Issue
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
  • Its worth noting that this problem seems to affect users of the Salesforce NonProfit Starter Pack (NPSP). However, its not a problem with the NPSP itself - Its a problem with the Hierarchical Custom Settings feature that NPSP happens to use. – codeulike Oct 18 '13 at 13:16
11

According to this page, it is a known issue for which a patch is scheduled to be deployed tonight

http://success.salesforce.com/issues_view?id=a1p30000000SU7PAAW

  • 1
    The fix was indeed deployed and my (new) sandbox is working as expected. Thanks for pointing out the Known Issue link - it wasn't there when I first started seeing the issue. – JLiljegren__c Oct 18 '12 at 7:19
  • I just hit this issue with a brand new Winter 14 sandbox. Looks like the fix did not hold. – Bao-Long Nguyen-Trong Oct 14 '13 at 23:52
  • @Bao-LongNguyen-Trong yes I'm getting it today on a Winter 14 sandbox too – codeulike Oct 15 '13 at 10:34
  • @Bao-LongNguyen-Trong see my answer below salesforce.stackexchange.com/a/18181/4126 – codeulike Oct 15 '13 at 12:16
6

It looks like this error message is back in Winter 14 Sandboxes.

Discussions in the Power Of Us Hub point to this Known Issue:

Known Issue: Copy Custom settings not copied in Config/Developer sandboxes

edit: also this known issue seems to cover it too: Winter 14 - Error on custom settings "duplicate value found: SetupOwnerId"

edit: We successfully created a Full sandbox so the problems seem to only apply to Configuration/Developer sandboxes

  • 2
    This issue is indeed back again, almost exactly one year later. The issue doesn't affect Full sandboxes from what I can tell. I logged a case with SFDC Support and they were able to resolve it for me by running some form of cleanup script on the database level. Here's my theory: The known issue that Custom Settings aren't copied over is the underlying issue. The settings are actually copied to a degree, but aren't visible/available to the application, ie when you go to add a new record it fails due to the underlying database constraint of it having to be unique. – JLiljegren__c Oct 17 '13 at 8:26
  • @JLiljegren__c Thanks, what do I need to say to SFDC to get them to run the cleanup script for me too? – codeulike Oct 17 '13 at 10:24
  • You could probably refer to my support case (09759274) and ask them to do whatever was done there. Sorry, I've asked for an internal bug tracking id or something, but I've not gotten any. :( – JLiljegren__c Oct 17 '13 at 11:25
  • 1
    This issue just made its way to SFDC's Known Issues site. I would encourage everyone to go to success.salesforce.com/issues_view?id=a1p30000000T0qwAAC and click the "This Issue Affects me" button. – JLiljegren__c Oct 18 '13 at 14:16
  • @JLiljegren__c So it is both this one success.salesforce.com/issues_view?id=a1p30000000SzhCAAS and this one success.salesforce.com/issues_view?id=a1p30000000T0qwAAC ? – codeulike Oct 18 '13 at 19:20
2

I have seen folks reporting the same issue on the non-profit message boards, so I think it is a bug in Winter 13

See here for more information: https://groups.google.com/forum/?fromgroups=#!topic/npsf/Jn2o_YYCJcU

  • Certainly looks like the same issue! I'll log a support case also. – JLiljegren__c Oct 11 '12 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.