E-mail activities are not automatically sent to the recipients when you distribute e-mail activities for a campaign in Microsoft Dynamics CRM (911520)
The information in this article applies to:
- Microsoft CRM 3.0
- Microsoft Dynamics CRM 3.0 Professional Edition for Service Providers
Important This article contains information about how to modify the
registry. Make sure to back up the registry before you modify it. Make sure
that you know how to restore the registry if a problem occurs. For more
information about how to back up, restore, and modify the registry, click the
following article number to view the article in the Microsoft Knowledge Base: 256986 Description of the Microsoft Windows registry SYMPTOMSWhen you distribute e-mail activities for a campaign in Microsoft Dynamics CRM, the e-mail activities are not automatically sent
to the recipients. Instead, you have to open each e-mail activity. Then, you
have to send each e-mail activity manually.RESOLUTIONHotfix informationA supported hotfix is now available from
Microsoft, but it is only intended to correct the problem that this article
describes. Apply it only to systems that are experiencing this specific
problem. To resolve this problem, contact Microsoft Product Support
Services to obtain the hotfix. For a complete list of Microsoft Product Support
Services telephone numbers and information about support costs, visit the
following Microsoft Web site: Note In special cases, charges that are ordinarily incurred for
support calls may be canceled if a Microsoft Support Professional determines
that a specific update will resolve your problem. The usual support costs will
apply to additional support questions and issues that do not qualify for the
specific update in question. Installation informationWarning Serious problems might occur if you modify the registry
incorrectly by using Registry Editor or by using another method. These problems
might require that you reinstall your operating system. Microsoft cannot
guarantee that these problems can be solved. Modify the registry at your own
risk. After you install this hotfix, create a registry
entry that is named CampaignSendEmail. To do this, follow these steps:
- Click Start, click Run,
type regedit, and then click
OK.
- In Registry Editor, locate the following registry subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\MSCRM
- Create the registry entry. To do this, follow these steps:
- Right-click MSCRM, point to
New, and then click DWORD Value.
- In the Name field, type
CampaignSendEmail.
- Double-click this registry entry, and then type
1 in the Value field.
Note If you type 1 in the Value field, CRM will
automatically send e-mail activities for a campaign.
If you type 0 in the Value field, CRM will not automatically
send e-mail created from the campaign
Prerequisites To install this update, you must have installed Microsoft Dynamics
CRM 3.0. Removal information To remove this hotfix, use Add or Remove Programs in Control
Panel. Restart requirement If you are prompted, restart the computer after you install the
hotfix. File information The English version of this hotfix has the file
attributes (or later file attributes) that are listed in the following table.
The dates and times for these files are listed in Coordinated Universal Time
(UTC). When you view the file information, it is converted to local time. To
find the difference between UTC and local time, use the Time
Zone tab in the Date and Time item in Control Panel. Microsoft Dynamics CRM 3.0 Server|
microsoft.crm.objectmodel.dll | 3.0.5300.1243 | 318,280 | July 31, 2006 | microsoft.crm.webservices.dll | 3.0.5300.1243 | 453,448 | July 31, 2006 | Microsoft Dynamics CRM 3.0 Professional Edition for Service Providers Server|
Microsoft.crm.objectmodel.dll | 3.0.5745.1018 | 318,280 | 06-Sep-2006 | 09:07 | Pkgutil.cmd | Not Applicable | 113 | 25-Aug-2006 | 04:09 | Microsoft.crm.objectmodel.dll | 3.0.5745.0 | 318,216 | 24-Feb-2006 | 12:31 |
STATUSMicrosoft
has confirmed that this is a problem in the Microsoft products that are listed
in the "Applies to" section.WORKAROUNDTo work around this problem instead of installing this
hotfix, create a Workflow .NET assembly to send e-mail activities
automatically. Note Microsoft CRM 3.0 does not support any .NET assemblies for which
the following conditions are true:
- You created the .NET assembly by using Microsoft Visual
Studio .NET 2005 and the .NET Framework version 2.0.
- You intend to use the .NET assembly as a Callout assembly
or as a Workflow assembly.
To create a Workflow .NET assembly, follow these steps:
- Create a new bit-type field on the Microsoft CRM E-mail
form to specify that the e-mail activity is for a campaign:
- In Microsoft CRM, click GoTo, point to
Settings, click Customization, click
Customize Entities, click E-mail, click
More Actions, and then click Edit.
- Click Attributes, and then click
New.
- In the Display Name field, type a
name. This example uses the name "Campaign E-mail."
- In the Type list, click
bit.
- In the Default Value list, click
No, and then click Save and Close.
- Click Forms and Views.
- Click Form, click More
Actions, and then click Edit.
- Click Add Fields, click the new field
that you created, click OK, and then click Save and
Close.
- In the E-mail Entity window, click
Actions, click Publish, and then click
Save and Close.
- Create a .NET assembly to send the e-mail activities. The
following steps create a new class library that is named AutoSend by using Microsoft Visual Studio .NET 2003:
- Start Visual Studio .NET 2003, and then click
New Project.
- Click Visual C# Projects, click
Class Library, type AutoSend for the
name, and then click OK.
- In Solution Explorer, right-click
References, and then click Add Web
Reference.
- In the URL field, type the path of the
Crmservice.asmx file. In the following example, localhost:5555 is a placeholder for the name of the Microsoft CRM Web site:
http://localhost:5555/mscrmservices/2006/crmservice.asmx - Change the value in the Web reference
name field to CrmSdk.
- Click Add Reference.
- Add the following using statement.
using AutoSend.CrmSdk; - Create a public method that accepts a Guid parameter for the ActivityId field of the e-mail.
Note You must replace the GUID value that is specified in the service.CallerIdValue.CallerGuid line with the GUID value in the SystemUserId field of a user from
the Microsoft CRM system who has the appropriate permissions to send e-mail
activities.
You can use the Fetch method to retrieve this user. Your method will resemble
the following.
public void SendEmail(Guid campaignActivityID)
{
CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
service.CallerIdValue = new CallerId();
// Replace the GUID with the GUID of
the Microsoft CRM Administrator.
service.CallerIdValue.CallerGuid = new
Guid("FD80F8E8-C852-DA11-B1FB-0007E94D105B");
SendEmailRequest req = new SendEmailRequest();
req.EmailId = campaignActivityID;
req.TrackingToken = "";
req.IssueSend = true;
try
{
SendEmailResponse res = (SendEmailResponse)service.Execute(req);
}
catch (System.Web.Services.Protocols.SoapException er)
{
// Process any error messages here.
}
} - After you change the service.CallerIdValue.CallerGuid line, click Build, and then click Build
Solution.
- Copy the newly created AutoSend.dll file that is in
the Bin\Debug folder of your solution to the following folder:
Program Files\Microsoft CRM\Server\Bin\Assembly
- Add the assembly information to the Workflow.config file:
- Click Start, point to
Programs, point to Administrative Tools, and
then click Services.
- In the Services window, right-click Microsoft
CRM Workflow Service, and then click Stop.
- Locate the Workflow.config file, and then open this
file in Notepad. By default, the path is as follows:
C:\Program Files\Microsoft CRM\Server\Bin\Assembly\Workflow.config - In the methods node, paste the following information.
<method name="E-mail"
assembly="AutoSend.dll"
typename="AutoSend.Class1"
methodname="SendEmail">
<parameter name="E-mailId" datatype="lookup"
entityname="email"/>
</method>
- Change the first line of Workflow.config file to the
following.
<workflow.config xmlns="http://microsoft.com/mscrm/workflow/"
allowunsignedassemblies="true">
- Save the file, and then close it.
- In the Services window, right-click Microsoft
CRM Workflow Service, and then click Start.
Note If the Services window is not open, repeat step 3a.
- Create a workflow rule that calls the Microsoft .NET
assembly to send the e-mail activities:
- On the Microsoft CRM Web server, click
Start, point to Programs, point to
Microsoft CRM, and then click Workflow
Manager.
- In the Entity Type list, click
E-mail, and then click New.
- In the Name field, type
Send Campaign E-mail. In the Event box,
leave Create selected, and then click
Next.
- Click Insert Condition, and then click
Check conditions.
- Click add conditions here, click
Insert Condition, and then click Check entity
condition.
- In the Field list, click
Campaign E-mail, click the equal sign, and then click the
lookup button.
- In the Static Value list, click
Yes, and then click OK two times.
- Click Insert Condition, and then click
Check entity condition.
- In the Field list, click
Direction, click the equal sign, and then click the lookup
button.
- In the Static Value list, click
Outgoing, and then click OK two
times.
- Click add actions here, click
Insert Action, point to Call assembly, and
then click E-mail.
- In the Action Name box, type
Send Campaign E-mail.
- Double-click the E-mailId parameter,
click Dynamic Value, leave E-mail selected in
the Entity box, and then click OK two
times.
- Click Save.
- Right-click the newly created rule, and then click
Activate.
- Test the rule. To do this, create a new campaign e-mail
activity, and then set the Campaign E-mail field to
Yes:
- In Microsoft CRM, select a test account record, click
Create Quick Campaign, and then click For Selected
Records.
- Click Next, and then type
Test Quick Campaign in the Name text
box.
- Click Next, click
E-mail, and then click Next.
- In the Subject box, type
Test E-mail, and then type Test
in the body of the e-mail.
- In the Campaign E-mail field, click
Yes, and then click Next.
- Click Create, and then verify that the
e-mail activity has been sent.
REFERENCES824684 Description of the standard terminology that is used to describe Microsoft software updates
887283 Microsoft Business Solutions CRM software hotfix and update package naming standards
Modification Type: | Minor | Last Reviewed: | 10/6/2006 |
---|
Keywords: | kbMBSemail kbQFE kbMBSworkflow kbMBSMigrate kbhotfixserver kbpubtypekc KB911520 kbAudEndUser kbAudKnowledgeWorker |
---|
|