16

I'd like to deploy the My Domain feature. It's currently in testing mode--admins can see it, redirects are happening, etc but it's not deployed to users.

The biggest concern I have is API endpoints that we currently provide to partners. If they're using our APIs, will this affect the endpoint URLs, or would they just follow the redirect safely?

Is there an easy way to see if we have anything internally hardcoded with an na1 (custom buttons, vf pages, links, email templates, etc)?

2 Answers 2

15

Enabling My Domain is additive - your existing endpoints will continue to work - you can use either na1.salesforce.com or mynewname.my.salesforce.com in API endpoints just fine.

Having said that, best practice is to avoid hardcoding the instance wherever possible. Apps should retrieve the instance from the SOAP login result or OAuth data. The reason for this is that, very occasionally, Salesforce needs to move a customer from one instance to another, and those na1-style references break. Of course, My Domain insulates you from this, since we would just point the My Domain at the new instance.

(Of course, there are always edge cases where you need to hardcode an instance name, and @techtrekker gives good advice in his answer - grab as much as you can via the IDE or Migration Tool and grep for matches).

5
  • 1
    worth noting that having myDomain on, with redirect, broke LiveAgent quicktext. I had to turn the redirect off to get it back. Commented Jan 6, 2014 at 16:22
  • @metadaddy Thank you for the answer, it has cleared most of my queries. Though I have one more question, my current url format is c.<instance-name>.visual.force.com/services/Soap/u/31.0/…>, we have enabled custom domain i.e. "custom-subdomain" now does my soap end point change to https://<custom-subdomain>.my.salesforce.com/services/Soap/u/31.0/<org-id>, kindly confirm. We are not doing this migration on sandbox so I am unable to test. Commented Jun 12, 2017 at 2:27
  • 1
    @AnupamSaini You should never hardcode an API endpoint, but instead use the value in LoginResult.serverURL as described at developer.salesforce.com/docs/…
    – metadaddy
    Commented Jun 14, 2017 at 14:58
  • We created a custom domain, and it broke the Bulk API calls. We now get an error "Remote name could not be resolved". Any ideas on what we can do to resolve? Commented Apr 24, 2018 at 21:52
  • Searching is not an issue. Problem occurred when you try to save to server or deploy to server. Force.com IDE doesn't let you allow to save it indeed show that file is dirty and some errors. Just on replacing the simple url string. Commented Jan 15, 2019 at 6:45
9

When setting up MyDomain you can choose to prevent login from login.salesforce.com

As long as you don't enable this you can still login via login.salesforce.com and follow the redirect that you receive in the authentication response .

MyDomain is usually rolled out to support SP Initiated SSO. Are you also rolling out SSO ?

https://help.salesforce.com/HTViewHelpDoc?id=domain_name_app_url_changes.htm&language=en_US

There isn't an automated way to search for hard coded references. However you can do a search across your code base either via the IDE or the Developer Console for hardcoded references.

Also when setting up My Domain you can configure redirects with or without warning so that older URLs that may be bookmarked redirect to the new My Domain URL.

1
  • I'm facing a similar situation. So if SP Initiated SSO is enabled (SFDC being SP), and login from login.salesforce.com is disabled, we cannot use login.salesforce.com for SOAP won't work?
    – LVS
    Commented Jan 18, 2014 at 15:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .