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
Koen (BvD)Koen (BvD) 

sandbox api - getting the correct url

This question often returns and I found the standard answer, but my case is slightly different.

 

So I know that the url to access the partner api (wsdl) is slightly different for a sandbox version (test.salesforce.com), however I can't change my initial url to connect, because I use the merge field {!$Api.Partner_Server_URL_160} to connect to the api using an already open session in salesforce. On the public urls for the partner api (either sandbox or production) you can only open a new session on the public wsdl and then receive a new url. As I don't have the log in credentials of the user I avoided this by using this merge field to get the correct url for an already connected user.

 

This doesn't work for a sandbox version. Any help or hint would be greatly appreciated.