1

I am trying to create a url in my class it gets created corectly and i am able to see it in debug log but when i pass it to the pagereference it does not redirect correctly. and it strips the parameters out of the url this is in my sandbox (Full). Please help. it should redirect to

/merge/accmergewizard.jsp?goNext=+Next+&cid=001b000000Fva5qAAB&cid=001b000000RvToJAAV&cid=001g000000RUAhaAAH

but it redirects to

/merge/accmergewizard.jsp?cid=001b000000Fva5qAAB&goNext=+Next+

please help

1
  • Could you post some of your code? Mar 11 '15 at 9:49
1

You can add parameters to your pagereference like this:

Pagereference pageRef = new Pagereference('/merge/accmergewizard.jsp');
pageref.getParameters().put('goNext','+Next+');
pageref.getParameters().put('cid','001b000000Fva5qAAB');

But looking at your input link you are trying to pass the same variable multiple times (3 times cId). I don't think that will work. You can try adding it as an array, like this:

/merge/accmergewizard.jsp?goNext=+Next+&cid[]=001b000000Fva5qAAB&cid[]=001b000000RvToJAAV&cid[]=001g000000RUAhaAAH

As explained here: https://stackoverflow.com/questions/6243051/how-to-pass-an-array-within-a-query-string

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.