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? Mar 11 '15 at 9:49

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

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.