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
Siana DcruzSiana Dcruz 

Refer the current page dynamically

I have the following line of code written in my class to refer to the current Page: 

Can anyone help me replace this code so as to refer the current page dynamically?

Sudhir ChowdarySudhir Chowdary

If you want to get parameters from current page use:

In your test class you can pass parameters to page by using:
PageReference.getParameters().put('id', myID);