May 19 2008
It happens often that a sales rep wants to send an e-mail to a lead that has been deactivated and they either don’t want to or don’t have the permission to activate the Lead. As you know once a Lead record is deactivated you cannot log an activity against it including sending an E-mail.
As a CRM consultant, recently I had a client request to provide a way for their sales rep to be able to send Emails to deactivated Leads. What follows is the steps required to make this happen.
The solution involves providing a button on the Tool Bar of the Lead record. This button once clicked will open up an E-mail activity record for the deactivated Lead.
This blog entry assumes that the reader already knows how to customize the Tool Bar by adding a custom button. If you don’t know, please let us know and we will provide the instructions.
Here is the custom code to accomplish the above:
Two points to remember:
- Please know that copying this code as is might be problematic with the use of quotations. Once you copy the code, you will need to go through and replace the single and double quotes using your keyboard.
- In http://crmsvr/activities/email/edit.aspx?pId=, you have to replace “crmsvr” with the name of your Micorosft CRM server.
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” >
<h1 align=”center”>Please Wait</h1>
var oOpenLead = window.dialogArguments;
var oLead = oOpenLead.document.crmForm;
var FirstName = oLead.firstname.DataValue;
var LastName = oLead.lastname.DataValue;
var GUID = oLead.ObjectId;
PA = window.open(“http://crmsvr/activities/email/edit.aspx?pId=” + GUID +“&pType=4&pName=”+FirstName+“%20″+LastName+“&partyid=”+ GUID +“&partytype=4&partyname=”+FirstName+“%20″+LastName+“&partyaddressused=&contactInfo=”,”,‘menubar=0, status=1′);