function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ChrisNorton.ax307ChrisNorton.ax307 

Button to create a task

I've spent a few minutes looking to see if this is possible and i'm confident that it can be.
 
We have a requirement to create a means to log an activity with one click.
E.g on the contact record have a custom button that executes some code to create AND SAVE a task with a specified subject ("VM Left") and have the user returned to the contact record.
 
I can see how to create a new custom button that will take you to the create a task screen with the subject pre-populated, however you still need to click on save, the 2nd click that i would like to eliminate.
 
Any help or pointers would be appreciated.
 
TCAdminTCAdmin
Hello Chris,

You can go to the Task custom buttons and link and create a related list button using the following code. You can then add that button to the Contact Activity History related list on the Contact page layout. This will allow you to create a custom task quickly. If you want it to save the record you would then add &save=1 at the end. If you want to go back to the contact after saving you would need to utilize the &retURL= feature.
Code:
/00T/e—tsk10=Call&tsk2_mlktp=003&tsk2={!Contact.FirstName} {!Contact.LastName}&tsk5=Call:&tsk4={!Today}&tsk12=Completed

ChrisNorton.ax307ChrisNorton.ax307
Hey Chris

Thanks for the quick reply. The code you posted didn't work for me, produces the error the page cannot be found but combining &save=1 with one of your previous posts on this subject did the trick!

Thanks again.

Chris
TCAdminTCAdmin
ChrisNorton,

I apologies for that. For some insane reason the SRC button changes the ? to a - in the beginning of it. It should be /00T/e? and it ends up being /00T/e- which doesn't work.

I also have instructions on my site but it is in the process of getting rebuilt.


Message Edited by TCAdmin on 06-13-2008 03:30 PM
AjinkyaAjinkya
I have done this and it works like a charm! However, I would also like to autofill the "Type" field. I imaginine it's as simple as adding &tskXX=Call to the code, but i don't know what tskXX should be!

In short, what is the corresponding tskXX to type? Also, does anyone have a sheet or website that explains all the fields?

Thanks.

Ajinkya