This question already has an answer here:
the url that I'm putting into the pagereference constructor isn't the one that's popping out. it's stripping off the last &retURL that's part of my &save_new_URL.
what's going on and how do i fix it?
String url = '/setup/ui/recordtypeselect.jsp?ent=Task'; url+= '&retURL=/' + this.who_Id; url+='&save_new_URL=/apex/taskOverRide?who_id=' + this.who_Id + '&retURL=/' +this.who_id ; system.debug('URL: ' + url); PageReference p = new Pagereference(url); system.debug('URL: ' + p.getUrl()); p.setRedirect(true); return p;
string URL output:
output from the constructor