You need to sign in to do that
Don't have an account?
Kinetic Growth 4
Instance Information for Custom URLs
Hi,
I'm trying to figure out a way to obtain the instance information from Custom Production / Sandbox URLs.
For example: If a Standard URL is "https://eu3.salesforce.com/" the instance information I'm looking for is "eu3" which can be obtained by calling "System.URL.getSalesforceBaseUrl()" and then parsing out the string.
But, when the URL is something like, "https://abc.my.salesforce.com/", how do I get the instance? Any help appreciated.
Thanks,
Shashank
I'm trying to figure out a way to obtain the instance information from Custom Production / Sandbox URLs.
For example: If a Standard URL is "https://eu3.salesforce.com/" the instance information I'm looking for is "eu3" which can be obtained by calling "System.URL.getSalesforceBaseUrl()" and then parsing out the string.
But, when the URL is something like, "https://abc.my.salesforce.com/", how do I get the instance? Any help appreciated.
Thanks,
Shashank
This should help:
http://www.michaelforce.org/recipeView?id=a0Ga000000Ekp65EAB
http://salesforce.stackexchange.com/questions/27751/get-the-salesforce-internal-non-site-url-from-a-site
Thanks,
Pratik
Hi Shashank;
you can try the code below;
Debug Log;
13:28:42:022 USER_DEBUG [2]|DEBUG|urlInstance==>eu5
Or if you are working at visualforce page you can implement the given Javascript code below;
CORRECTION: