-
Visualforce redirect issue on forgot password link
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}" />
Log In to reply.
Popular Salesforce Blogs
What is a Test class in Salesforce? | The Ultimate Guide
Testing is an important part of SDLC. So, before deploying our code to the production environment, Salesforce requires at least 75% of your code to…
What is the Flosum Tool in Salesforce in 2023?
Version control, continuous deployments, static code analysis, in-built merge tools, user story management, and continuous testing are all features of the native tool Flosum in…
Popular Salesforce Videos
Getting started with salesforce
Salesforce is a customer relationship management solution that brings companies and customers together. It's one integrated CRM platform that gives all your departments — including…
What is Salesforce APEX? How to use APEX? Salesforce Interview Questions and Answers
Apex is a strongly typed, object-oriented programming language that allows developers to execute flow and transaction control statements on Salesforce servers in conjunction with calls…
Salesforce Account-Based Marketing Demo
Salesforce Account-Based Marketing is a partnership aligning Marketing, Sales, and Service around a single view of your top accounts. A partnership which reesults in long…