E-Mail To Case for free

Dear CRM Community,

I was invited by the Microsoft CRM Team to write a blog entry for you.

I thank the Microsoft CRM Team for this privilege.

For this blog entry, I decided in favor of how to create a button for the mail form. With this button a user can create a new case, based on information of the mail. I took this decision because it shows some typical procedures in the world of Extending Microsoft CRM and it is a real world example which could be used for your own projects.

After a click on the button “E-Mail To Case” a new case and a relationship to this mail is created. The name of the case is the name of the mail:

To create such a button the following technology is used:

• Visual Studio 2005
• Microsoft ASP.NET 2.0
• Microsoft CRM 3.0 Web Services
• isv.config.xml and web.config
• Microsoft CRM 3.0 Reporting Viewer

With Visual Studio 2005 an ASP.NET 2.0 based web page CreateCase.aspx is created. This web page is used to create the new case with the support of the Microsoft CRM 3.0 Web Services and is registered in the isv.config.xml as a new toolbar button.

The Microsoft CRM 3.0 Reporting Viewer is used to open the mail with the updated reference to the case. You can implement this approach by the link as follows:
http://danubecrm:5555/CRMReports/viewer/drillopen.aspx?ID= {51749F60-B256-4671-B909-FD849ED5A99B}&OTC=4202

The needed procedures for this sample are written in a document that I uploaded to Microsoft CRM Sandbox website. You can find the document here: http://www.gotdotnet.com/codegallery/releases/viewuploads.aspx?id=b6499eb0-0eae-4597-b38e-ee9cbc71a404. Note from JaAG: Because of recent problems with the GotDotNet server you may have to enter the site twice to get to this page.

Please kindly note that I cannot take over any liability regarding the functionality and quality of this sample. But I would be pleased to receive any comments from you with reference to this demonstration. May be you also have some ideas about additional functionalities such as setting an initial subject of the case and preventing a second click on the button.

Best regards,
Jürgen Beck
MVP for Microsoft CRM

Comments (6)

  1. Brad says:

    Can anyone provide assistance for this error?

    System.Web.Services.Protocols.SoapException: Server was unable to process request. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at CrmSdk.CrmService.Create(BusinessEntity entity) at _CreateCase.GetStatus()

    0x80040237 Operation failed due to a SQL integrity violation. Platform

  2. AKHAN says:

    I followed the document and everything seems fine but getting the same error Brad posted about SQL Injection violation. Any input would be greatly appreciated.

  3. Jürgen Beck is working as an independent consultant, programmer, trainer and author since 1995. He is

  4. Code works in my dev environement – not in production tho.  Here is error:


    at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, String path, String pathTranslated, Boolean useAppConfig) at System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

  5. Sadly, the GotDotNet site is no longer available.  Is there any chance you can repost this article somewhere else?

  6. 365blog says:

    The new site for CRM code samples is the MSDN’s Code Gallery. Enjoy.

Skip to main content