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
dhruvadhruva 

na1 vs. ssl.salesforce.com

Hi,
I'm developing an application that provides several links into a customer's SFDC database. Unfortunately, I've found at least two versions of links:
https://na1.salesforce.com/... and https://ssl.salesforce.com/...

And if we provide the wrong type of link, the customer is forced to re-login for each link. Any way I can determine the right domain through the API, so I can reliably provide the right link?

Thanks!
SuperfellSuperfell
the login call returns the right url, if you're coming in via a WIL, then there's a merge field for it
dhruvadhruva
SimonF wrote:
> the login call returns the right url

Thanks. I notice that a customer that needs ssl.salesforce.com has this in their loginResponse:
'serverUrl' => 'https://na0-api.salesforce.com/services/Soap/c/6.0'

So, does this mean I can use na0 for them instead?
SuperfellSuperfell
if you want the URL to the webapp, then call describeSobject("Account") and look a the URLs in there.
dhruvadhruva
Oh, cool. when I print (Perl)

$result->valueof('//describeSObjectResponse/result/urlDetail')

I get
https://ssl.salesforce.com/{ID}

I'm assuming urlDetail should always be there in every (sfdc) account, right? Or is it preferable to use one of the other fields?

Thanks, Simon. This has been really helpful.
SuperfellSuperfell
UrlDetail will always be there for the account entity.