Thursday, October 11, 2007

Remove / Detach Email from Queue

DetachFromQueueEmail Message
Detaches the e-mail from the specified queue.

// Use below code.

// Rreplace the WebService URL
service.Url = strWebServiceURL;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

DetachFromQueueEmailRequest objEmail = new DetachFromQueueEmailRequest();

// Assign Email GUID
objEmail.EmailId = new Guid(strEmailGUID.Trim());

// Assign Queue GUID
objEmail.QueueId = new Guid(QueueIdNode.InnerText.Trim().ToString());


Is it so simple..........right.


Peter Widmer said...

Thank you so much! Works perfectly

Anonymous said...

How do you implement this code?

Anonymous said...

how to implement this code ?

Ranjitsingh Raghuwanshi - MS CRM Techno-Functional Consultant. said...


Create a CRM Service Object by specifying the Web Service URL and the USER credentials.

Create a Object for DetachFromQueueEmailRequest.

This class has below properties:

EmailId - Specify the GUID of Email record which you want to detach.
QueueId - Specify the GUID of QUEUE, Remove record From Queue.

Pass this object to Crm Service Execute method.

This way you can remove the Email Record from Queue.

Please let me know if you need any help.


Anonymous said...

I am new to crm, so could you please tell me how will you get the id of queue.