You need to sign in to do that
Don't have an account?
nwesoccer
Salesforce instance settings
I have a url to a callout, but wish that the url be different depending on which instance of salesforce i'm on. I'm trying to call a different callout when I'm in the Sandbox than when I'm in Production. Is there a global setting where that url can reside?
I think this would help you
public static String getDomain () {
String hostname = ApexPages.currentPage().getHeaders().get('Host');
String domain = 'https://' + hostname + '/apex';
return domain;
}
That method gives you the current host name where you are.
Ignacio.