You need to sign in to do that
Don't have an account?
![rvk rvk](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
command link is not working
HI,
I have developed a login page for the partner portal in that there is a command link "forgot you password" which is not at working below is the code.Initially it was working all of a sudden it was stopped working.Can any one help me.
VF code:
<div>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td> <apex:commandLink value="Forgot your password?" action="{!ForgotPasswordLink}"/> </td>
</tr>
</table>
</div>
controller method code :
Global pageReference ForgotPasswordLink (){
String startURL = ' ';
if(url.contains('cs')){
startURL = 'https://tapp0.salesforce.com/secur/forgotpasswordp.jsp';
startURL += '?orgId=*************&portalId=**************&loginType=3';
startURL += '&pLu=%2Fsecur%2Flogin_portal.jsp';
}
else{
startURL = 'https://na7.salesforce.com/secur/forgotpasswordp.jsp';
startURL += '?orgId=*************&portalId=*******************&loginType=3';
startURL += '&pLu=%2Fsecur%2Flogin_portal.jsp';
}
pageReference p = new PageReference(startURL);
p.setredirect(true);
return p;
}
You can use the built in Password reset feature (for portal users)
Site.forgotPassword(String username)
This uses the existing salesforce password reset feature for portal users.
Thanks for the reply.According to the requirement it should forward to that link.There user enters the user name to get the password.
The issue was resolved.Thanks