function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ryanelkinsryanelkins 

Sudden error in accessing custom settings

We use custom settings in a SalesForce app. We access it like so:


    MySettings__c settings = MySettings__c.getOrgDefaults();

 

This was working fine, but today the app completely crashed. By that I mean the page doesn't load at all, I just get a white screen telling me an internal error occurred. We traced it down to this line of code - when it is commented out the page loads as well as it can without those settings (but at least it loads). 

 

Running that single line of code in the System Log (using the Execute functionality) also causes a report of Internal System Error. The only thing the system log reports is "FATAL_ERROR Internal Salesforce.com Error." The Apex code modal reports "Internal System Error: 1018505045-332 (-920440070)"

 

The setting has values for the organization - we've also tried deleting the settings and recreating them to no affect. So far SalesForce support has been no help beyond telling us to try posting here.

 

This is very frustrating as it was working fine on Friday and today it was broken before anyone touched anything.

aalbertaalbert

If you have logged a support case, what is the Case #? I will escalate it accordingly. 

ryanelkinsryanelkins

My case number is 05683687 but that was before I figured out what was causing the problem. Before all I knew was the app was bombing whenever we went to the page. I'm not really sure how to update it with the new information that I have.

 

aalbertaalbert

Thanks. I updated the case internally with a link to this discussion board post and its content. The support rep should be contacting you to follow up. 

ryanelkinsryanelkins

I'd also like to point out tha tI find it comical that the error message directs me to "please contact Salesforce Support." 

 

That link gives me a "Data Not Available" error message and asks me to "please look at our support page."

 

Yeah, you guessed it. That link goes to a "URL No Longer Exists" page. 

 

Sheesh. I've only been working with Salesforce development for about a month but I have to say - not too impressed so far.

 

This is definitely a technical issue, I called back a few times later and supposedly the person I talked to was going to escalate the issue (again? not really sure if it was really escalatated the first time or not). 

 

Is there a better number to call when you have an actual technical problem? I mean this is a documented Apex method call that compiles fine but blows up without explanation when it executes (that had been working fine for weeks before no less).

@ImJohnMDaniel@ImJohnMDaniel

Hopefully this will help you.

 

We have been dealing with almost exactly the same issue as yourself.  The only variation was that we were using the "getInstance()" method off the custom setting and not the "getOrgDefaults();" method.  The internal error message that you describe is exactly what we were seeing though.

 

This issue started for us yesterday (7/12/2011), right after a deployment into a FULL sandbox. All code using any of the heirarchy custom settings in that sandbox became useless.  

 

I did find that all of our code (classes, triggers, pages, etc.) were set to apiVersion 22.0 which is currently the latest version.  I tweaked the apiVersion of the files back to version 21.0 and that has allowed us to move forward with no issue.  Clearly, it has not corrected the bug, but it is providing an effective workaround to fall back to the earlier version of the code base.

 

All the best.

 

Cheers,

 

John

Ralph CallawayRalph Callaway

Word is that this is resolved.  If you're still seeing this error with API version 22.0, you should create a new case with salesforce support and update this thready.