CRMBuzz.net

Abe Saldana on Microsoft Dynamics CRM Development
posts - 19, comments - 5, trackbacks - 0

Thursday, June 12, 2008

How to's - Detach an E-mail from a Queue

The E-mail to Case process one of the final steps is to make the e-mail not to display on the Queue, that is called detaching from the queue, this blog post is a follow up on one of the initial blog post on this new CrmBuzz URL, the original post was How to Detach an Email from a Queue? Summary..., so finally after some replies and follow up e-mails and questions I got the time to put in the details for one of most requested line:

returnStatus = emailDetach.EmailDetachFromQueue(EmailID, SourceQueueId);

 

The code snipped: 

   1: public bool EmailDetachFromQueue(Guid EmailID, Guid SourceQueueID)
   2: {
   3:     bool returnvalue = false;
   4:     try
   5:     {
   6:  
   7:         DetachFromQueueEmailRequest detachEmail = new DetachFromQueueEmailRequest();
   8:         detachEmail.EmailId = EmailID;
   9:         detachEmail.QueueId = SourceQueueID;
  10:  
  11:         DetachFromQueueEmailResponse detachedEmailResponse = (DetachFromQueueEmailResponse)service.Execute(detachEmail);
  12:  
  13:         returnvalue = true;
  14:  
  15:     }
  16:     catch (System.Exception e)
  17:     {
  18:         returnvalue = false;
  19:  
  20:     }
  21:  
  22:     return returnvalue;
  23: }

 

The E-mail detach process will not give you too much information on the validity on the completion and you probably will need to validate making another call, so these are some of the steps for the e-mail to case (incident)

  1. Validate E-mail content is not Spam or Duplicate
  2. Create new Contact with E-mail address information
    1. Create new Account with E-mail address information
    2. Relate new Account with new Contact
  3. Validate that E-mail is not relation to any Case (Incident)
  4. Create new Case (Incident) with E-mail information
  5. Detach E-mail from the Queue (Private or Public Queue)
  6. Assign the new Case (Incident) to the User Private Queue (Incident Owner)

 

So these are the most common steps for converting an E-mail to a Case, I will be working on a similar process for Spam e-mails on MS Dynamics CRM 4.0 but in this version I will be using the Workflow's capabilities, stay tuned for more details on the new workflow E-mail to Case process.

Check the Articles soon you would find information related to SDK connectivity with CRM 4.0 On Premises and Online versions

 

Abe Saldaña

CrmBuzz.net

This all is undocumented and unsupported. Therefore you should only try these kinds of modifications if you feel comfortable working with this.
Everything here, though, is my personal opinion and is not read nor approved before being posted. No warranties or other guarantees will be offered as to the quality of the opinions or anything else offered here.

posted @ Thursday, June 12, 2008 4:50 PM | Feedback (0) | Filed Under [ Callouts Code Level 300 MS Dynamics CRM 3.0 Performance SDK code Unsupported ]

Powered by: