0

I want to implement the answer found in Delete Attachment in SharePoint 2010 list:

You can define a content type for attachments. Then, set an information management policy for the content type

The answer seems simple enough. But how do I define a content type for the attachments?

1

The thread you have mentioned is a bit misleading. The marked answer will not delete just the attachments but the whole item itself. Is this what you want?

To delete just the attachments look at the answer just below the marked answer. That points to an article over here http://littletalk.wordpress.com/2009/11/18/delete-attachments-from-item-in-sharepoint-by-code. The code mentioned in this article should be placed in a timer job.

Regards.

  • 1
    That's what I was wondering. I want to delete the attachment, but leave the list item. Deleting attachments in a timer job was my fallback plan. But I wanted to do it in an expiration policy. It looks like a custom Expiration Action is what I want. – Rich Bennema Apr 1 '15 at 20:01
  • 1
    That's even better. There is example code over here code.msdn.microsoft.com/office/… – Arsalan Shahid Apr 1 '15 at 20:06
  • It's like you're reading my mind. :-) – Rich Bennema Apr 1 '15 at 20:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.