Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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!

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.