You need to sign in to do that
Don't have an account?
EPSWDEV
Getting Site URL
I have Standalone Apex class that sends out and email and in which i wish to embed a link to custom object detail page. eg link would be http://na6.salesforce.com/somecustomobj.Id
my problem is I dont want to hard code the domain name in the url in my apex class so am trying to find out what class I can use to get my orgs url. I tried touse the Site.getCurrentSiteUrl however no luck with that. I use PageReference here either - apexpages.currentPage returns null so that no good either. Any help is appreciated.
Thanks
I just posted a blog post on a similar topic. It includes an example of how to capture both the Session Id and API Server URL from within Visualforce and setting the controller properties. You mention a "standalone" class so not sure if visualforce will help you, but worth mentioning. I also haven't tried this within the context of a Force.com Site.
Blog posting here
Try This :) ,
With this you'll get something like this:
http://na6.salesforce.com
Furthur you can append id of any object in this string.