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
santhosh.usanthosh.u 

Importance of setting SforceService.Url property before calling SforceService.login()

I'm new to Salesforce API, I'm trying to update salesforce case record comments from my applications, when I went through the samples, I see that in few samples, Url property of the SforceService is being set before SforceService.login() is called, this property is later overridden by the value returned by LoginResult.ServerUrl. I'm just wondering the importance of doing so... is it good practice to set Url property before calling login method? if yes, where do I get this Url? should I grab from WSDL? what if this changes later? -Santhosh
jtwoods4jtwoods4

Did you ever answer this question? I am wondering the exact same thing. The API works fine if you dont set the URL property. Why do some people set it?