function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
spuishspuish 

Programmatically determine if the user is in a Sandbox

Hello,

We have an AppExchange application that makes extensive use of the partner API.  We have a customer who wants to test the application in their sandbox.  As it is now, this does not work as we are using the www.salesforce.com url.  Is it possible to programmatically detect whether a user is in a sandbox?

Thanks,
 --Sarah Andrews
benjasikbenjasik
aside from the URL you are connecting to, I don't think there is a good way to do this.  I will add it to our backlog, this is a good idea.