Activity Forums Salesforce® Discussions Visualforce redirect issue on forgot password link

  • Visualforce redirect issue on forgot password link

    Posted by Piyush on April 30, 2016 at 5:33 PM

    I have a login page with username and password and forgot password link on salesforce community, when a user enters a wrong password it is throwing error. When the error is thrown and I click on the forgot password link the page is refreshing instead of redirecting to forgot password page. Can anyone help in resolving the issue?

    public PageReference forgotpswd()
    {
    pageReference pg = new pageReference(/apex/pagename);
    Page.setRedirect(true);
    return pg;
    }

    Visualforce Page:

    <apex:commandLink value=”Forgot Password?” action=”{!forgotpswd}” />

    Himanshu replied 10 years ago 2 Members · 1 Reply
  • 1 Reply
  • Himanshu

    Member
    May 27, 2016 at 11:50 AM

    Hi Piyush,

    Pagereference pg = new Pagereference (‘/apex/yourpagename’);

    Hope this helps you.

Log In to reply.