function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ranjith PunneliRanjith Punneli 

Error: Your login attempt has failed. Make sure the username and password are correct.

Hi All,

 

I have enabled customer portal sign in link which takes to custom built sign in page. When you enter username and password and click on Log in, it will check and pass details to another page by calling Site.Login(un, pswd, startURL) where startURL or second page controller has https://cs9.salesforce.com/secur/login_portal.jsp?orgId=&portalId= link to login to appropriate page. 

However, I am only getting  this error 'Your login attempt has failed. Make sure the username and password are correct. '

 

Site Page which has Sign In link

<div id="signin_link"><a href="https://<companyname>.secure.force.com/success/SiteLogin?language=en_US">Sign In</a></div>

 

SiteLoginController

global String username {get; set;}
global String password {get; set;}

startURL = '/CommunityLogin?email='+username+'&language='+userLanguage;
return Site.login(username, password, startURL);

 

CommunityLogin

Check whether contact exists

Check whether user exists

if both exists pass values:

'https://cs9.salesforce.com/secur/login_portal.jsp?orgId=&portalId=&un=&pw=';

 

However, I am only getting above error and I am not able to check that in developer sandbox.

 

Need info:

How to identify developer and production customer portal?

Difference between Site.login() and calling pagereference 'https://cs9.salesforce.com/secur/login_portal.jsp?orgId=&portalId='

 

Thanks,

Ranjith