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
lapaullapaul 

How do you retrieve the URL or the web page address from Apex code

hi,

 

How do you retrieve the URL or the web address or visualforce page address  from Apex code? Please advice.

 

thanks

Paul

 

bob_buzzardbob_buzzard

The following code should give you that:

 

 

ApexPages.currentPage().getUrl();

 

 

Pradeep_NavatarPradeep_Navatar

You can retrieve the URl in apex page by using global variables {!$CurrentPage.URL};

 

Did this answer your question? if so, please mark it solved.