You need to sign in to do that
Don't have an account?

Refer the current page dynamically
Hi
I have the following line of code written in my class to refer to the current Page:
System.currentPageReference().getParameters().get('selectedTemplateId');
Can anyone help me replace this code so as to refer the current page dynamically?
If you want to get parameters from current page use:
ApexPages.currentPage().getParameters().get('selectedTemplateId');
In your test class you can pass parameters to page by using:
PageReference.getParameters().put('id', myID);