Find your content:

Search form

You are here

Unable to insert new records into "hierarchy" type Custom Setting

 
Share


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

Attribution to: JLiljegren__c

Possible Suggestion/Solution #1

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


Attribution to: codeulike

Possible Suggestion/Solution #2

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


Attribution to: Bao-Long Nguyen-Trong

Possible Suggestion/Solution #3

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


Attribution to: BritishBoyinDC
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/2194

My Block Status

My Block Content