You need to sign in to do that
Don't have an account?

Sites and Customer Portal
Hello,
I'm using Sites to authenticate and register new users. These users will be Customer Portal Users. I have been reading the Ron Hess article: http://wiki.developerforce.com/index.php/Authenticating_Users_on_Force.com_Sites
it's great info.
I have issues to land into the correct Customer Portal Home page. Do you know how to achieve this?
Thanks, Javier.
After login sites takes you to the site home page.
If you want to navigate to a different page after login then you can do one of the following:
1- Provide a value for the StartURL parameter in the url. For example http://abc.force.com/SiteLogin?StartURL=pagename
2- Change the code in the Site login apex class like following
String startUrl = System.currentPageReference().getParameters().get('startUrl');
if (startUrl == null) startURL = (Site.getPrefix() == null ? '' : Site.getPrefix()) + '<page_name>';
return Site.login(username, password, startURL);
All Answers
After login sites takes you to the site home page.
If you want to navigate to a different page after login then you can do one of the following:
1- Provide a value for the StartURL parameter in the url. For example http://abc.force.com/SiteLogin?StartURL=pagename
2- Change the code in the Site login apex class like following
String startUrl = System.currentPageReference().getParameters().get('startUrl');
if (startUrl == null) startURL = (Site.getPrefix() == null ? '' : Site.getPrefix()) + '<page_name>';
return Site.login(username, password, startURL);
I am having a similar issue, When I click on the site URL, it is redirecting me to to the Authorization Required Page.
But here whenI give the correct credentials, it does not take me to the Home Page.
It comes back to the same Authorization Required Page..
But if I give the wrong password, It throws me error msg, After this, if I give the correct Credetials , Now it takes me to the home Page.
Unable to figure it. Just not getting whats wrong with it.
Please help.
But this works perfectly in sandbox. AFter I moved to Production, this is what is happening
I used this one... and got it work ..but it works only if I dont give the Prefix part ..
if the site address is mycomp.force.com, this works..
but if I use mycomp.force.com/partners, this is not working properly
So after Login, it does not take me to the home page, it stays on the same authorization required page..
Can you suggest me any ideas?
Dear Forum Members,
I am having the same problems as the others. I dont get redirected to the Customer Portal home page after logging into the SiteLogin page. I tried editing the siteLoginController class with Bulent's code. Previously I had just copied the LoginURL for the Customer Portal as the startURL for the Sites login class. That did not work either.
When I try to login using an authenticated user I am brought back to the login page. Although when I click logout it redirects me to the proper logoutURL specified in the Customer portal.
Logically speaking I should be redirected to the LoginURL mentioned on the Customer portal but that would mean that I would have to enter the login details once again when I am on that page (if it eventually does redirect me there). I would ideally like to go directly to the Home tab of the Customer portal. How do I find out the URL for the Home tab of my customer portal so that I can enter that as the startURL.
Another thing was the profile used by the Sites is the Guest profile. How do I change that so that it uses the profile I have created for my Customer Portal users?
Regards,
Ballal Joglekar
This worked to get me to the customer portal home page, but I'm getting the error message page instead of my custom home page (VF page) It says "https://mycompany.secure.force.com/portal/ is under construction". When I login via the portal URL, I don't get this error page. I checked all of the class and VF page permissions for the portal profile.
Any ideas what could be wrong?