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());

service.Execute(objEmail);



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

5 comments:

Anonymous said...

Thank you so much! Works perfectly

Anonymous said...

How do you implement this code?

Anonymous said...

how to implement this code ?

Dynamics 365 Solution Architect | Azure / ALM/DevOps | Power Platform said...

Dear,

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.

Thanks,
Ranjit

Anonymous said...

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