How to get parameters passed to a URL in salesforce apex

H

If we pass parameter while creating a page in salesforce apex like this

public PageReference setParameter()

{

public papageReference ref = new PageReference(‘/apex/print?email=’ + textEmail1);    ref.setRedirect(true);

return ref;

}

where email is the parameter. Then using the following function we can get the value of the parameter passed

public getParameter()

{

email = ApexPages.currentPage().getParameters().get(’email’);

}

About the author

juilee.joshi
By juilee.joshi

Category