function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
khvpkhvp 

VF Global Variables in Apex

How can I access the $Site global variables from within apex? Specifically I want the $SIte.OriginalURL value.

 

Thanks.

 

Best Answer chosen by Admin (Salesforce Developers) 
BulentBulent

Just search Sites-Related Apex Methods in online help (getOriginalUrl)

here the link if you are on na1: https://na1.salesforce.com/help/doc/user_ed.jsp?section=help&target=sites_apex_methods_and_merge_fields.htm&loc=help&hash=SitesApexMethods

All Answers

BulentBulent

Just search Sites-Related Apex Methods in online help (getOriginalUrl)

here the link if you are on na1: https://na1.salesforce.com/help/doc/user_ed.jsp?section=help&target=sites_apex_methods_and_merge_fields.htm&loc=help&hash=SitesApexMethods

This was selected as the best answer
khvpkhvp

First I tried to search the Force.com IDE Documentation and only found two entries for OriginalUrl, both of which are VisualForce. I also tried to search this forum and didn't have any luck.

 

Thank you for the link.