You need to sign in to do that
Don't have an account?
maxout
Getting Site URL from within trigger
Hi there,
It is to get user's org server/domain.
Trying Site.getCurrentSiteUrl, but it returns null.
In the context of trigger, there seems to be limitations.
Any idea appriciated.
Related:
http://boards.developerforce.com/t5/General-Development/Getting-Site-URL/m-p/109559
This works:
Cookie counter=new Cookie('NoneObject', '0',null,-1,false);
string=counter.getDomain();
However, wondering what is the best practise.
The event that takes you in trigger is taking place from where? Any site page acceses from guest user profile?or you have logged in as internal user and performing event that invokes a trigger?
Try This :) ,
As part of Summer 11, there is now a System.URL class which should let you grab your instance URL using URL.getSalesforceBaseUrl()
http://developer.force.com/releases/release/Summer11/System+URL+Class
The event is a normal save action from the web UI, instead of a background process.
Thanks to you alll.