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
Software EngineSoftware Engine 

Can we change binding URL dynamically?

Hi,
 
   I have implemented application. I have to test both in Prodcution and SandBox.
   so i need to change the URL.
 
     String SandBoxURL= "https://test.salesforce.com/services/Soap/c/9.0"
     String ProductionURL="https://www.salesforce.com/services/Soap/c/9.0" 
 
        binding = New Sforce.SforceService
        binding.Timeout = 60000
        loginRes = binding.login(UID, PWD)
        binding.Url = SandBoxURL / ProductionURL
        binding.SessionHeaderValue = New Sforce.SessionHeader
        binding.SessionHeaderValue.sessionId = loginRes.sessionId
 
       Would this work. Will it really points to the assigned URL.
 
    Thanks.