In my managed package I have included a Remote Access application that references my external web site to handle various integration tasks including:

  • Product fulfillment requests/cancellations
  • Client specific options to populate Visualforce dropdown elements

In my supporting Apex Controller Extension classes, I reference the live site URL, but for testing purposes I would like to reference a test server so orders are not fulfilled.

Is there a suggested approach for having production and test Remote Access applications accessible within a managed package?

1 Answer 1


I've seen this managed with Custom Settings. You could either have a URL field or just a checkbox. Everywhere you reference the URL, you'd check the custom setting instead. You'd also need to provide a Visualforce page to manage your application settings.

The benefit of using Custom Settings is that they can be accessed without SOQL and are fast to access.

  • Thanks Daniel. This approach has worked so far. I ended up with a default value in the code and was able to override the value for testing with a custom setting. Commented Aug 9, 2012 at 16:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .