Salesforce's "One Click, One Voicemail Activity" Button + Prompt box for comments.
I extended the idea presented here: http://www.youtube.com/watch?v=BOTH3XQGauk for creating a custom salesforce button which creates a followup task for a contact by allowing the user to specify some notes to go along with the task in a fast javascript prompt box. This is a lot faster then creating a new activity which requires a new page to load and would setting the follow up date..
Follow the directions in the video except for when it comes to defining the custom button specify the following.
Behavior: Execute Javascript
Content Source: OnClick JavaScript
Here’s the code:
For a ‘Contact’ Button
var comments = prompt("Enter follow up details (to jog memory later)", ""); if( comments == null ) { alert("Task creation canceled"); } else { comments = encodeURIComponent(comments); // encodes in url friendly way window.location = ' /00T/e?followup=1&title=Call&retURL=%2F{!Lead.Id}&who_id={!Lead.Id}&what_id={!Lead.Id}&tsk6_fu='+comments+'&tsk5_fu=Follow+Up+w+{!Lead.Name}+[{!Lead.Name}]&tsk4_fu={!TODAY()+2}&save=x'; }
For a ‘Lead’ Button
var comments = prompt("Enter follow up details (to jog memory later)", ""); if( comments == null ) { alert("Task creation canceled"); } else { comments = encodeURIComponent(comments); // encodes in url friendly way window.location = ' /00T/e?followup=1&title=Call&retURL=%2F{!Contact.Id}&who_id={!Contact.Id}&what_id={!Account.Id}&tsk6_fu='+comments+'&tsk5_fu=Follow+Up+w+{!Contact.Name}+[{!Account.Name}]&tsk4_fu={!TODAY()+2}&save=x'; }
Usage Suggestion
The way we use this at our organization is we made several buttons: FU_1d, FU_2d, FU_1w, FU_3mo. Each button is a different length of time. Just copy the code above and change the +2 after TODAY() to +1, +2, +7, and +90 respectively.
Reference
Finally, here’s a reference of some of the GET parameters. I didn’t find the official documentation just a post on salesforce community so there are probably others.
tsk1=Assigned To tsk2=Name tsk3=Related To tsk4=Due Date tsk5=Subject tsk6=Comments tsk9=Activity Currency tsk10=Type
Reader Comments (8)
I guess I am not the only one having all the enjoyment here! keep up the good work.<a href="http://www.ptwatches.com/panerai.html" title="replica panerai watches">replica panerai watches</a>