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

StartUrl issues
I have tried the following for the startUrl in Site.login method. But the returnURL still returns only the 1st parameter. It should return both the parameters in the url.
--------------------------------------------------------
startUrl = '/home?a=' + value1 + '~b=' + value2;
PageReference page = Site.login(username, password, startUrl);
String temp = page.getParameters().get('retURL');
temp = temp.replaceAll('~', '&');
page.getParameters().put('retURL', temp);
return page;
--------------------------------------------------
OR
Used '+' instead of '&' in the startURL.
-----------------------------------------------------
Any suggestions that I can try to make it work....
Hi, why don't you try this?
startUrl = '/home';
PageReference page = Site.login(username, password, startUrl);
page.getParameters().put(a, value1);
page.getParameters().put(b, value2);
This way you will put the parameters in the url, you cant just write the parameters.
Ignacio.