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


but it redirects to


please help

  • Could you post some of your code? Commented Mar 11, 2015 at 9:49

1 Answer 1


You can add parameters to your pagereference like this:

Pagereference pageRef = new Pagereference('/merge/accmergewizard.jsp');

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:


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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .