Find your content:

Search form

You are here

How can I reference a test Remote Access application while testing my managed package?


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?

Attribution to: Brad Ullery

Possible Suggestion/Solution #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.

Attribution to: Daniel Hoechst
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content