none
Sharepoint List Retention Policy based on Modified Date RRS feed

  • Question

  • How do I implement a Sharepoint List Retention Policy that deletes list items that haven't been modified in X days?

    I've tried to create a retention policy in Sharepoint, but I only get the option to base the policy on:

    • Created Date
    • Declared Record

    I need the policy to be based on Modified Date, a standard date field that appears against all lists & document libraries. Is there a configuration change I can make to cause Modified Date to appear in the list of available fields on the Retention Policy dialog window?

    Thanks.

    Wednesday, January 14, 2015 12:13 PM

Answers

  • Veda, thanks but I'm not really a hardcore C# coder.

    We found more elegant solution was to create a List View which returns all records that should be deleted, based on our own custom deletion criteria, and then create an very simple SSIS Package in Visual Studio using the Sharepoint Connectors for SSIS to delete all Sharepoint List Items returned from that List View. The Sharepoint Destination Connector has a delete operation.

    This worked for us and didn't require any coding.

    Wednesday, January 14, 2015 4:02 PM

All replies

  • Hi Bobby,

    Take a look at this link.

    http://www.savtechsol.com/Education/BeckysBlog/Lists/Posts/Post.aspx?ID=150

    Thanks.

    Wednesday, January 14, 2015 3:21 PM
  • Veda, thanks but I'm not really a hardcore C# coder.

    We found more elegant solution was to create a List View which returns all records that should be deleted, based on our own custom deletion criteria, and then create an very simple SSIS Package in Visual Studio using the Sharepoint Connectors for SSIS to delete all Sharepoint List Items returned from that List View. The Sharepoint Destination Connector has a delete operation.

    This worked for us and didn't require any coding.

    Wednesday, January 14, 2015 4:02 PM
  • Hi Bobby, you could create custom code to do this as per veda and link below, but I suggest using a SP Designer workflow and/or InfoPath to base your retention policy on. http://www.c-sharpcorner.com/UploadFile/anavijai/how-to-create-custom-expiration-formula-in-sharepoint-2010/

    cameron rautmann

    Wednesday, January 14, 2015 4:10 PM
  • Cameron, the link you've provided makes no mention of SP Designer or InfoPath - It's another custom code solution using a Visual Studio Sharepoint Project template. Did you intend to post that link? I'm confused.

    SSIS Package still seems like the most elegant solution in this thread, so far.

    Wednesday, January 14, 2015 4:30 PM