• Andrew Cox
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
Hello,
  • I have a custom VF page with a custom APEX controller behind it.
  • I've tested the page in a Sandbox and then deployed it successfully to production a while ago.
  • It's now failing in production with the following error "The configuration of your org has changed, please reload the page. Missing dependent object: Field: Contact.OtherAddress" - this happens when I click a submit button on the page.
  • I am not using the OtherAddress field in the page or controller as far as I can see.
  • I have tried incrementing the version of the API to 31.0 on both page and controller (having seen a similar discussion (https://developer.salesforce.com/forums?id=906F00000008x7wIAA)).
  • When I did this the failing page worked for one submit - but then went back to failing on next use!
I'd love help. Please! :-)
Hello,
  • I have a custom VF page with a custom APEX controller behind it.
  • I've tested the page in a Sandbox and then deployed it successfully to production a while ago.
  • It's now failing in production with the following error "The configuration of your org has changed, please reload the page. Missing dependent object: Field: Contact.OtherAddress" - this happens when I click a submit button on the page.
  • I am not using the OtherAddress field in the page or controller as far as I can see.
  • I have tried incrementing the version of the API to 31.0 on both page and controller (having seen a similar discussion (https://developer.salesforce.com/forums?id=906F00000008x7wIAA)).
  • When I did this the failing page worked for one submit - but then went back to failing on next use!
I'd love help. Please! :-)

The new mock classes  are great! Except for one thing I have a block of code that does something like this

 

try {

 //do a callout

} catch(Exception ex) {

 //handle an expection 

}

 

I want to test the handling of an exception part of the code. Initially I though I could just create a mock class that throws an exception in the response method something like this

 

@isTest
public class MockHttpCalloutGenerator implements HttpCalloutMock {
 
public HTTPResponse respond(HTTPRequest req){
 
throw new CustomException('Exception occured during callout');
 
}
 
}

 

The problem is that when I run the test I get a System.UnexpectedException: Exception occured during callout. And it doesn't exercise my exception handling. Is there a way to do this, or am I hosed for testing callout exception handling?