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
Br1Br1 

Call site methods from apex

I need the site url (the url given by the method Site.getCurrentSiteUrl()) , but not in the context of the site, just at an internal page.

 

I know that is the expected behavior (at the bottom of the sites help page are a note that says "You must also use them within the context of your public site; otherwise, a null value is returned.") but i need this url inside the crm.. any workaround?

 

thx

 

brx

Best Answer chosen by Admin (Salesforce Developers) 
BulentBulent
There is no current site when you are not in site context. Sorry, no workaround.

All Answers

BulentBulent
There is no current site when you are not in site context. Sorry, no workaround.
This was selected as the best answer
Br1Br1
ok, thx bulent