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
Saurabh.rawane.ax708Saurabh.rawane.ax708 

Site.Login return page Parameters

Hi,

 

I am trying to make a Site.login call with passing some parameters to returning page like this

 

Site.Login(username,password,'/createTest?avalue=XXXX&bvalue=YYYYY')

 

Looks like this redirect is not taking more than one parameter, so I am able to read avalue, but bvalue doesn't gets passed across at all.

 

Any help?

Best Answer chosen by Admin (Salesforce Developers) 
Saurabh.rawane.ax708Saurabh.rawane.ax708

I used  '~' and passed all things which i want to pass in one parameter, which then i parsed across splitting on  ~ and it worked. thanks for the responses

All Answers

imuino2imuino2

It should work, try with + instead of &

BulentBulent

try using 

 

{!URLENCODE(text)}

 if you need to pass parameters

 

RyanGuestRyanGuest

It looks like Site.Login should retain the full startUrl you are passing in. I've notified the technology team of this bug.

 

As a workaround, you can 

Saurabh.rawane.ax708Saurabh.rawane.ax708

I used  '~' and passed all things which i want to pass in one parameter, which then i parsed across splitting on  ~ and it worked. thanks for the responses

This was selected as the best answer
SwapnilSwapnil

HI Saurabh, Can you let me know what exactly u did. Because I have the same problem where I need to pass more than 1 parameter to the startUrl. Using '~' I was able to pass the parameter, but how can I parse the loginPage reference that I got.

Saurabh.rawane.ax708Saurabh.rawane.ax708

If you have following as your start URL --- >> firstPage?param1=test~test~test

 

You can read, with system get parameter the first parameter and then user String split methods to get all values separated with ~.

 

Does this helps?

SwapnilSwapnil

Yes I did the same exact thing, it works for couple of pages menas couple of URLs but not for few others, anyways thanks for your reply. BTW are you from Akola?

RyanGuestRyanGuest

This should be fixed now. If you continue to see this not working, please let me know.

zaidyzaidy

We are experiencing this issue again. Has any one else experienced this issue after Summer 10 release?

Chirag MehtaChirag Mehta

@All : Any idea on another issue related to Site.Login

http://community.salesforce.com/t5/Apex-Code-Development/Site-Login-returns-extra-digits-25-in-the-URL/td-p/197610

 

Please post your replies at above url only (don't post replies on this post)