+ Start a Discussion

Is there any way to retrive the Organization server Url using Apex?

Hey Guys,

             I want to know that is there any way to get Organization's server url using Apex (neither via Visualforce nor via Site, let Site is disabled or let I want to use that in Trigger).


eg. https://na6.salesforce.com/home/home.jsp

in this server url would be https://na6.salesforce.com/



Vijay RautVijay Raut



Have you got any answer on this?


I was also looking for same thing, without luck. Finally we had made workaround by storing BASE_URL / SERVER URL in one of the Custom Object (which we have used to store system / dynamic variables) to control our integration.