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
tnstns 

Custom Left Voicemail button

I picked up the following Tip during a SFDC presentation and it works great on the Contact record. It creates a button on the Contact object, which when clicked, creates an activity in the Contact record and sets up a reminder task in 2 days.

I need to modify it to do the same on a Case object. Can anyone help me modify the code so that it does the same in a Case, i.e. creates an activity that a VM was left, and creating a reminder task when clicked? 

Code is at the end of the next section.

Need: Track all activities to contacts within Salesforce and save time by having one click logging of left voicemails

Business Case: Sales reps can quickly log voicemail calls and receive a reminder task a few days later to follow up on the voicemail.

Business Value: Make more calls, improve productivity in high call volume type environments

Left Voicemail Custom button instructions

To set 1 custom buttons on the contact record – LVM

select Setup| Appsetup | Customize | Contacts | Custom Buttons and Links | select new custom button

Create a button label name (LVM) in the display type select the Detail page button option

select behavior type - Display in existing window without sidebar or header

select content source – URL

 

add the Code: (modify the code to fit your instance)

/00T/e?followup=1&title=Call&retURL=%2F{!Contact.Id}&who_id={!Contact.Id}&what_id={!Account.Id}&tsk5=LVM&tsk6=Left+a+voicemail+for+{!Contact.Name}

&tsk5_fu=FU+VM+w+{!Contact.Name}+fr+{!Account.Name}&tsk4_fu={!TODAY()+2}&save=x

Best Answer chosen by Admin (Salesforce Developers) 
EnthEnth

Have you simply tried using on the Case page? The Add Activity History page link (00T/e) is the same regardless of it being a Contact or Case, all you should need to do is supply the correct what_id value and merge fields for Case.

 

For example, assuming you want the activity linked to the case:

 

/00T/e?followup=1&title=Call&retURL=%2F{!Case.Id }&who_id={! Case.ContactId}&what_id={!Case.Id}&tsk5=LVM&tsk6=Left+a+voicemail+for+{!Case.Contact}&tsk5_fu=FU+VM+w+{!Case.Contact}+fr+{!Case.Account}&tsk4_fu={!TODAY()+2}&save=x 

 

 

should work 

All Answers

EnthEnth

Have you simply tried using on the Case page? The Add Activity History page link (00T/e) is the same regardless of it being a Contact or Case, all you should need to do is supply the correct what_id value and merge fields for Case.

 

For example, assuming you want the activity linked to the case:

 

/00T/e?followup=1&title=Call&retURL=%2F{!Case.Id }&who_id={! Case.ContactId}&what_id={!Case.Id}&tsk5=LVM&tsk6=Left+a+voicemail+for+{!Case.Contact}&tsk5_fu=FU+VM+w+{!Case.Contact}+fr+{!Case.Account}&tsk4_fu={!TODAY()+2}&save=x 

 

 

should work 

This was selected as the best answer
tnstns

Thanks Enth. That worked!

 

One more question. Is it possible to add to your code so that it selects Type = Call - Left Message when the activity is created? This is from a required, single select picklist field called "Type" that contains several values.

rob_burkettrob_burkett

Try adding "&tsk10=Call" to the first task, then "&tsk10_fu=Call" to the second task.

 

This is what we're using:

 

/00T/e?followup=1&Type=Call&retURL=%2F{!Contact.Id}&who_id={!Contact.Id}&what_id={!Account.Id}&tsk10=Call&tsk5=Left Voicemail&tsk6=Left+a+voicemail+for+{!Contact.Name}

 

&tsk5_fu=Follow up+w+{!Contact.Name}+at+{!Account.Name}&tsk4_fu={!TODAY()+2}&tsk10_fu=Call&save=x

netTrekker_ADnetTrekker_AD

Can someone post a generic code example for how to auto-update a couple custom picklist fields using this button code?

jim_lukensjim_lukens

Hi - I always use the save=x commend snippet, as shown here and it always works. but for some reason in this org that I am working in I am getting a strange invalid session error and then it asks me to hit the save button again? I can not seem to get the save=x to work on any objects? Has anyone else seen this? Thanks

francisrfrancisr

I'm experiencing the same error message. I'd love for it to be automatic for my users so that we don't have to confirm/hit save again.

 

This is the code I'm using:

 

/00T/e?followup=1&title=Call&retURL=%2F{!Contact.Id}&who_id={!Contact.Id}&what_id={!Account.Id}&tsk5=LVM&tsk6=Left+a+voicemail+for+{!Contact.Name}
&tsk5_fu=FU+VM+w+{!Contact.Name}+fr+{!Account.Name}&tsk4_fu={!TODAY()+3}&save=x

 

Any help would be appreciated to fix this.

 

Thanks!

LSaundersLSaunders

This is great! Was wondering how I would go about making changes to the formula so that I can incorporate this on the Lead object as well.

 

Also, how can I make the button be on the activity related list of the case rather than on the top of the case?

EnthEnth

1. To log it on a Lead, again just replace the merge fields with the Lead object fields, so:

 

 

/00T/e?followup=1&title=Call&retURL=%2F{!Lead.Id}&who_id={! Lead.Id}&what_id={!Lead.Id}&tsk5=LVM&tsk6=Left+a+voicemail+for+{!Lead.Name}&tsk5_fu=FU+VM+w+{!Lead.Name}+fr+{!Lead.Company}&tsk4_fu={!TODAY()+2}&save=x 

 

 

2. To put on the Activity Related list you need to create the custom button on Event or Task, but this time make it as List button instead, Then edit your page layout, click on the properties of the Activity related list and add the custom button. Voila!  if you want to do this to Contact, Case and Lead you'll need to create separate buttons for each.