Redirect not working, always redirecting to homepage
I have overridden the New Task buttonto go to a visualforce page which acts as a url creator depending on where the new button was called from. It builds a the standard new task url but adds a whoId, whatId and retUrl parameter.
My problem is that, i want the user to be redirected to the New Task they just created upon clicking on 'save', however instead the user is taken to the homepage upon saving. And this is no matter what I put in the retUrl. If I take out the override and manually add some retUrl values to the default new Task page everything works fine.
What am I doing wrong?
Let me know if you need to see any pieces of code and I will gladly provide.