Sunday, November 9, 2014

[How To?] Set expiration policy for items

Sometime, we've got the stresses to see a warning message from system event viewer. It showed the database limited exceeded or the list is reached the threshold for auditors and administrators but it's not too many items in the list. If you don't want to waste the resources, databases and the time to access the list, there is a way to delete the very old items and think about the deleting process in case.

Microsoft Office SharePoint Server [2010, 2013] has a feature to cover all items following the date and do an action if the condition in criteria reaches out.

Here is a instruction to set the expiration for SharePoint list item

  • Go to Central Administration -> Monitoring -> Review Job Definitions: to make sure that the job named "Expiration Policy" is running.

  • Go to Site Actions -> Site Setting -> Site Content Types under Galleries category. Click on any content type that you want to set the expiration date. This is not applied to specific list/site or item but for content type. 



  • Click on Information management policy settings to enable the Retention option.



  • The Library Document has own the retention settings, if administrator defines the stage in library setting, the setting for document content type will be overwritten. If there are many stages in the setting, make sure that the action and condition in each stage is separately and unique.   
  • In this challenge, I will define a stage to delete very old item. See a picture
  • All items there were created a month ago will be deleted automatically.
  • Of course, we could define many stages for one content type and each of stage can have a repeater actions.
Limitation:
  • It's only available for Microsoft Office SharePoint Server. There is no feature for SharePoint Foundation.
  • We could not define a condition with specific date.
  • It has not supported the query condition instead of selecting on date-time column.
  • There is no exception on the query.
  • There is no configuration for specific list, site or item.