Send Emails to Deactivated Leads Without Needing to Activate Them First

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:

  1. 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.
  2. 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” “”>

<html xmlns=”” >


<title>Quick Email</title>



<h1 align=”center”>Please Wait</h1>

<script type=”text/javascript”>

var oOpenLead = window.dialogArguments;

var oLead = oOpenLead.document.crmForm;

var FirstName = oLead.firstname.DataValue;

var LastName = oLead.lastname.DataValue;

var GUID = oLead.ObjectId;

PA =“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’);





Microsoft CRM Consultant
Unitek Microsoft CRM Services

2 replies
  1. Massimo
    Massimo says:

    I’m facing almost the same problem you had but I don’t know how to add a button to the toolbar. Can you provide me a link with some information about it?

    Thanks is advance


Trackbacks & Pingbacks

  1. […] I will use the “Quick Email” example/code from my last post. (Send Emails to Deactivated Leads Without Needing to Activate Them First) […]

Comments are closed.