7

I'm trying to replace the New Task and New Event buttons on the Case Activity related list. When the users press the new button, they want to remain on the newly created task and not be navigated back to the Case. Sounds simple, but I can't figure it out, below is the URL button I have now.

/00T/e?who_id={!Case.ContactId}&what_id={!Case.Id}

Any ideas? Thanks!

3

I'm actually not sure you can do this easily. The retURL parameter is honored by New Task, but if it's omitted, it will take you to the parent object (behavior you're seeing).

It's possible there's a simpler solution, but off the top of my head a solution that would definitely work would be to create a custom VF page, say "RedirectToTask". This page queries for the last Task created by the current user and redirects them to that page (i.e. /[Task.Id]).

Then you just override the "New" button to go to /00T/e?who_id={!Case.ContactId}&what_id={!Case.Id}&retURL=/apex/RedirectToTask and you'll have it.

| improve this answer | |

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.