My Domain and API endpoints

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)?

Answer

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).

Attribution
Source : Link , Question Author : Shane McLaughlin , Answer Author : metadaddy

Leave a Comment