• ctjr
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
I looked through the Apex documentation and I didn't see any methods that return the server the code is executing on. I figure it has to be there and I'm just missing it as this would be required for packaged apps so they scales across all servers.

What I am doing is build a string that is a hyperlink but I need the server instance (na3, cs1) so I can build out the correct link.

opp is a Opportunity object.
String link = 'https://na3.salesforce.com/'+ opp.id;

Hard coding the na3 is not a good solution. Maybe there is some other way to do this?

Perhaps:

String link = opp.getLink();

but I didn't see anything like this.

Thanks for the help.
-Jason