Follow Me On...
« Switching from RingCentral to a Asterisk box... My Notes. | Main | RingCentral + Salesforce (Click to call phone numbers) »
Friday
Jul162010

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';
}
(Note not all code is visible above but it’ll be there when you copy and paste the selection above)

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';
}
(Note not all code is visible above but it’ll be there when you copy and paste the selection above)

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)

Thanks for taking the time to talk about this, I feel fervently about this and I take pleasure in learning about this topic. Please, as you gain information, please update this blog with more information. I have found it very useful.<a href="http://www.replicaslust.com/cheap-luxury-emporio-armani-239.html">cheap luxury EmporioArmani watches</a>
April 1, 2011 | Unregistered CommenterFORTER58
-<a href="http://www.newitbags.com/new-samsung-it-bags-107.html">new Samsung it bags</a>pleasure in learning about this topic. Please, as you gain information, please update this blog with more information. I have found it very useful.<a href="http://www.replic
July 7, 2011 | Unregistered Commenternew Samsung it bags
This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles,<a href="http://www.ptwatches.com/chopard-1/la-strada.html" title="la strada watches"> la strada watches</a>
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>
July 13, 2011 | Unregistered Commenterabbyabbie
contented mind is the greatest blessing a man can enjoy in this world.http://www.sunglasses-wholesale.biz/oakley-sunglasses-wholesale-750.html
What a blog seen hardly like these blogs nice stuff i9n the blog thanks for the blog dude thanku very much....:) avtgmq avtgmq - <a href="http://www.biebersupras.com">bieber supra shoes</a>.
October 21, 2011 | Unregistered Commenterqotcoa qotcoa
Very, very nicely done! rfblik rfblik - <a href="http://www.monclernorway.com">moncler norway</a>.
November 20, 2011 | Unregistered Commenterdujacz dujacz
I really do appreciate your feedback. I'm still struggling with the technology but I wish everyone all luck with this competition. I've been pinned down with a sick grandchild and today a very sick daughter - both with gastric flu which afflicts us all at this time of year - so this is the first moment I've had to get to the computer otawbl otawbl - <a href="http://www.2012monclerjacket.com">moncler jacket outlet </a>.
December 11, 2011 | Unregistered Commenterzmnthe zmnthe
I'd actually love to review these boxes on my shopping/lifestyle blog. i wonder if they'd send me a sample box to talk about? bnkjeo bnkjeo - <a href="http://www.monclercoats.fr">moncler nouveau</a>.
December 16, 2011 | Unregistered Commentersvmqxe svmqxe

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.