Apex method to identify salesforce.com server - Ideas - Salesforce Trailblazer Community
Trailblazer Community

All Ideas

Idea Details

Post an Idea
This idea has been delivered and can no longer be voted or commented on. If you’d like to add to this conversation, please post a new idea.
2,160  Points voting closed
Delivered in Summer 11
Delivered in Summer 11

Apex method to identify salesforce.com server

Development (Apex, LWC & VF)

It would be helpful to have an Apex method that returns the server sub domain (na1, na2, cs1, ap0, etc). When building hyperlinks in the code for either external emails or the comments section of Task, Notes, etc you must hard code the value into your hyperlinks. This makes it difficult for the code to be packaged and scale across different orgs.

· Flag

Latest Comment from Salesforce

  • Josh Kaplan - 8 years ago

    This can be accomplished with the URL class:


  • Upvotes
  • Downvotes



from AppExchange

Help us to keep IdeaExchange clean by pointing out overlapping ideas. We'll investigate your suggestion and merge the ideas if it makes sense.



Thanks for your merge suggestion. We will review it shortly and merge the ideas if applicable.

Salesforce takes abuse situations very seriously. Examples of abuse include but are not limited to posting of offensive language or fraudulent statements. To help us process your request as quickly as possible, please fill out the form below describing the situation. For privacy and security reasons, the final outcome of an abuse case may not be revealed to the person who reported it.


Thank you for your feedback. We take abuse seriously and will investigate this issue and take appropriate action.