Keep email message but delete attachment
-
Monday, June 11, 2012 4:10 PM
Using CRM 2011 Online
We have an issue - when we send out large attachments through the email router a copy of the attachment gets stored in the database.
We need to keep the email but remove/delete the attachments.
It appears that we will need to write a plugin to be able to accomplish this. Has anyone created such a plugin?
If there is a way to send the email/attachment but not store the attachment? That would accomplish our goal.
If there is a way through workflow or the bulk delete tool that would also be sufficient.
Anyone interested in writing such a plugin please let me know.
Thanks
Doug
Doug Steinschneider DCS Group
- Edited by dcsgroup Monday, June 11, 2012 4:11 PM
All Replies
-
Monday, June 11, 2012 4:51 PM
You could use the bulk delete option for this and create a filter for attachments with filesize > XXXCarsten Groth http://carstengroth.wordpress.com Microsoft Dynamics Certified Technology Specialist
- Proposed As Answer by Neil BensonMVP, Moderator Monday, June 11, 2012 5:59 PM
-
Monday, June 11, 2012 5:32 PM
Hi Carsten,
Won't we lose the email itself if we use the bulk delete option? I'll refine the mandate:
We need to remove/delete attachments identified by name (email subject has same name) but keep the original mesage the attachment was "attached" to.
Thanks,
Doug
Doug Steinschneider DCS Group
- Edited by dcsgroup Monday, June 11, 2012 5:32 PM
-
Monday, June 11, 2012 5:59 PMModeratorDoug, you can follow Carsten's suggestion to delete the Notes that are a file attachment bigger than X MB. He's not suggestion that you use the Bulk Delete feature to delete the email message.
Neil Benson, CRM Addict and MVP at Slalom Consulting. Find me on Twitter. Join over 20,000 other CRM professionals on the Microsoft Dynamics CRM group on LinkedIn.
-
Monday, June 11, 2012 7:45 PM
The only way I've been able to look up the email attachment objects in the system by the name of the attachment is through Email Messages with related Email Attachments and then paste in the attachment name for File Name equals. At that point if I delete it deletes the email message and the attachment. I need to keep the email message (closed activity with subject and body). Sorry I'm not following on recommended method.
Doug Steinschneider DCS Group
-
Monday, June 11, 2012 7:51 PM
If I do an advanced find on Notes and put in the filename equals TestBigPDF.pdf nothing returns. The attachments were attached to an email template (usually 1-3 attachments of 1-2MB in size) and then sent out to marketing list contacts.
These attachments are not needed in record and using up a lot of storage. Again we need to keep a record that files with that name were sent on that day along with the email body.
Thanks.
Doug Steinschneider DCS Group
-
Monday, June 11, 2012 8:10 PM
- Proposed As Answer by Sven Vanoirbeek Monday, June 11, 2012 8:10 PM
-
Monday, June 11, 2012 8:41 PM
Hi Sven,
Thanks for post, for each filename there are about 2000 messages that need 1-3 attachments removed. From the replies here and my research I'm concluding that I will need to commission an MSCRM dev to build us a app/plugin that will allow us to submit a filename and have it remove all attachments named with that filename.
Doug
Doug Steinschneider DCS Group
-
Tuesday, June 12, 2012 1:47 PM
Doug, you can follow Carsten's suggestion to delete the Notes that are a file attachment bigger than X MB. He's not suggestion that you use the Bulk Delete feature to delete the email message.
Neil Benson, CRM Addict and MVP at Slalom Consulting. Find me on Twitter. Join over 20,000 other CRM professionals on the Microsoft Dynamics CRM group on LinkedIn.
Hi Neil,
When I did advanced find on Notes with a file attachment and put in filename equals the attachment I want to remove they didn't appear. They do appear when I do an advanced find on email messages and then pick related Attachments and then Filename equals "Example_file.pdf". But then any delete actions are against the entire email message and attachments.
Thanks,
Doug
Doug Steinschneider DCS Group
- Edited by dcsgroup Tuesday, June 12, 2012 1:48 PM
-
Wednesday, August 22, 2012 2:55 PM
We are having the same issue here.
We want to delete just the attachment of the emails we currently have in the system.
How can we do this without deleting the entire email message? We need to keep the email messages but delete just the attachments.
-
Wednesday, August 22, 2012 6:11 PM
You will find sample code in the sdk
SampleCode\CS\BusinessDataModel\Activities\CRUDEmailAttachments.csCarsten Groth http://carstengroth.wordpress.com Microsoft Dynamics Certified Technology Specialist CRM Online 30 Tage kostenfrei testen – http://crm.dynamics.com/de-de/trial-overview
-
Wednesday, August 22, 2012 7:20 PM
Hi Carsten,
Thanks for the sample code location in the SDK. I'll take a look at it and come back and mark this as an answer along with my notes on how I was able to implement it.
Doug
Doug Steinschneider DCS Group
-
Wednesday, August 22, 2012 7:36 PM
Hi James,
Are you working out of the Jersey City office? I'm in CT but have a buch of clients in midtown. I've been looking into creating a small solution for this. I'm thinking of collecting other people who need this in a KickStarter type effort (maybe that's the place to do this?) and then having a good developer (one of the author's of a Microsoft Press book on MS CRM emailed me that he is interested in developing solution). Please contact me at dougs(at)dcsgroupllc(dot)com if you're interested.
Doug
Doug Steinschneider DCS Group
-
Thursday, September 20, 2012 6:53 PM
Doug,
Were you able to find the solution? We are eager to implement this asap in our CRM...
We have exact issue as well, need to delete all of the attachments, but keep the email record.
Thank you!
Anya
--- ATS2011

