Thursday, July 23, 2015

Salesforce Tips and Tricks: 7 Day FUP Button

Salesforce, Salesforce Tips & Tricks, Tips & Tricks

Written by Chad Smith Chad Smith

Chad Post Picture 2

One of my favorite, and I think truest, sales quotes of all time is this: “It is not your customer’s job to remember you. It is your obligation and responsibility to make sure they don’t have a chance to forget you,” by Patricia Fripp. Hence, the importance of following up with leads, opportunities, and customers. While Salesforce can’t make that call, or draft that personalized follow-up for you, it can make the process of reminding yourself to follow-up very simple using tasks. Out of the box, Salesforce is pretty good at this, let me show you how to make it every better. So let’s put two buttons on the Opportunity that, with a single click will automatically schedule a 7 Day or 14 Day Follow-Up note to yourself.

 

Pictured are the button options you’ll want to pick:
Here’s the JavaScript Code:
{!REQUIRESCRIPT(“/soap/ajax/30.0/connection.js”)}var taskToCreate = new sforce.SObject(“Task”);taskToCreate.OwnerId = “{!$User.Id}”;
taskToCreate.WhatId = “{!Opportunity.Id}”;
taskToCreate.Subject = “Follow-up If Not Heard From”;var d = new Date(); d.setDate(d.getDate()+7);var date1 =((d.getMonth()+1)+”/”+d.getDate()+”/”+d.getFullYear());
taskToCreate.ActivityDate = new Date(date1); taskToCreate.Priority = “Normal”;
taskToCreate.Status = “Not Started”; result = sforce.connection.create([taskToCreate]);
window.parent.location.href=”/{!Opportunity.Id}”;

You can easily edit the the future date by changing the +7 on line 9 to a different value, and if you want to create a button for leads replace where you see

{!Opportunity.<<someField>>}

with

{!Lead.<<SomeField>>}.

Hope you enjoy!

Reach Out

Are you a manufacturer ready for the cloud?
Click the link below to learn how Luxent can help bring your company to the next level.

Let's Work Together
Current template: /var/www/luxent.com/www/wp-content/themes/brew-master/single.php