Configure Retention Policy in SharePoint Document Library

This SharePoint tutorial explains, how we can configure retention policy in a document library or list in SharePoint 2010/2013. The Retention policy feature lets you define retention stages, with an action that happens at the end of each stage.

Suppose you want to delete documents that are created 1 year back, then this feature will be very much helpful.

An information management policy is a set of rules that govern the availability and behavior of a certain type of important content.

Configure Retention in Document library in SharePoint

You can create a retention policy definition within the site collection and then you can apply the retention policy to content types in SharePoint. Also, you can create a retention policy directly on a SharePoint list or document library.

Before doing anything first activate the “Library and Folder Based Retention” feature. Go to Site Settings and then under Site Collection Administration click on Site collection features.

In the list of Site Collection Features, search for “Library and Folder Based Retention” and click on Activate if it is not Active.

configure retention policy sharepoint online
create retention policy sharepoint 2010 for document library

Then return back to the Site Settings page, Click on “Site collection policies” under Site Collection Administration. This will open the Policy page.

configure retention policy sharepoint 2013
create retention policy sharepoint 2010

Click on Create in the toolbar. This will open the page to create a policy.

retention policy for sharepoint
retention policy for sharepoint

In the Create Policy page, Give a name, Administrative description, policy statement. Then check the Enable Retention checkbox as shown in the fig below.

Retention Policy for document library in SharePoint 2010
Retention Policy for document library in SharePoint 2010

Then click on Add a retention stage. link. This will open the Stage properties dialog box. We need to give the event like Created Date + 60 days means this will cause the stage to activate.

Configure Retention in Document library in SharePoint 2010
Configure Retention in Document library in SharePoint 2010

There are a lot of actions defined in it and we should use as per our requirement.

  • Move to Recycle Bin: In this case, when this will run the item will be moved to recycle bin.
  • Permanently Delete: If you will choose this action, the item will permanently get deleted.
  • Transfer to another location: If you want things like archival then this is the appropriate option.
  • Start a workflow: If you will choose this action, it will start a workflow but make sure it previously exists.
  • Skip to next stage: It will do not do anything rather skip to the next stage.
  • Declare record: If you have enabled the use of records in your site collection, this option allows you to turn a non-record into a record when the specified period of time elapses.
  • Delete previous drafts: This will remove all draft versions of the document but it will not delete the major version.
  • Delete all previous versions: This will delete previous versions of the document.

Then now if you want to configure this retention for any particular document library or list then go to the list or library settings. From the Permission and Management click on Information management policy settings.

Here click on any of the content types like Item or Folder. Here there will be 3 option. None, define a policy or use a site collection policy. Here we will the 3rd option and we will use the policy which we have created just now.

Then click on OK.

create retention policy sharepoint 2013 for document library
create retention policy sharepoint 2010 for document library

there are no registered destination locations on this site. select another option

Now, we will see how to fix an error which comes when you will configuring Retention policy. The error message is: “there are no registered destination locations on this site. select another option.”

Recently when I am trying to enable Retention for a SharePoint list and I choose the action as “Transfer to another location” I got the above error.

there are no registered destination locations on this site

Actually, before choosing this action, we should configure the Send To URL in the central administration.

For this, we need to first activate the Content Organizer site feature. To activate this go to the Site Settings then from the Site Actions section choose “Manage Site Feature”. This will open the Features page. Search for the “Content Organizer” feature and click on Activate.

Now Open SharePoint central administration and then click on “Configure send to connections” from the General Application Settings section. There you can give the Display name and Send To URL and click on Add Connection and click on OK.

Now in the Retention Policy page if you will choose Transfer to another location it will not give any error.

Configure Send To URL in SharePoint

Now, we will see how to configure Send To URL in SharePoint Central Administration in SharePoint 2010. If you want to enable Retention for a SharePoint list and if you want the action as “Transfer to another location” then you need to configure Send To URL before configuring Retention settings.

So before going to central administration, Go to site settings and click on “Manage site features” from Site Actions section.

This will open the Features page, Search for the “Content Organizer” feature and click on Activate if it is not activated.

Configure Send To URL in SharePoint

Once the feature got activated you will see the link “Content Organizer Settings” under the Site Administration section in the Site Settings page. Click on the link and go to the Submission Points section in the “Content Organizer: Settings” page. Then copy the OfficialFile.asmx web service URL.

Configure Send To URL in SharePoint 2010

Now Open SharePoint 2010 Central Administration and click on “Configure send to connections” from General Application Settings section. In the next page, go to the Connection Settings section and give a Display name, and give the Send To URL (the OfficialFile.asmx web service URL which we have copied from the Content Organizer: Settings page.)

Here also you can choose the Send To action like Copy/Move etc. and then click on OK. Now the Send To URL is configured.

Force Retention Policy to Run Now or specific Days in SharePoint 2013

Now let us see, how to force retention policy to Run now or on specific intervals days in SharePoint 2013. By default Retention Policy will run on a weekly basis.

As in this example, we have configured the Retention Policy to move items to recycle bin which are created 1 day before, but this will not work expected because the timer jobs associated with this will run on a weekly basis.

The timer jobs are:

  • Information management policy
  • Expiration policy

Here a point to remember is that “Information management policy” job should run before the “Expiration policy”.

We can change the retention policy schedule to run on a daily basis or now from Central Administration.

Force Retention Policy to Run Now or specific Days in SharePoint 2013

Open SharePoint 2013 Central Administration then go to Monitoring. Then from Monitoring page, click on Review job definitions from the Timer Jobs like below:

Retention Policy in SharePoint 2013
Retention Policy in SharePoint 2013

Then search for “Information management policy” in Job Definitions and click on it. In the recurring schedule select Minutes/Hourly/Daily/Weekly or monthly basis. And click on OK. If you want to run Now then click on the Run Now button as shown in the fig below:

Force Retention Policy to Run Now or specific Days in SharePoint 2013
Force Retention Policy to Run Now or specific Days in SharePoint 2013

Then search for “Expiration policy” and click on that. In the recurring schedule select Minutes/Hourly/Daily/Weekly or monthly basis. And click on OK. If you want to run Now then click on the Run Now button as shown in the fig below:

Force Retention Policy to Run Now sharepoint 2013
Force Retention Policy to Run Now sharepoint 2013

Notice here I have scheduled “Information management policy” to run in 15 min interval and I have scheduled “Expiration policy” to run in 10 min interval. so that Information management policy to run before Expiration policy.

You may like following SharePoint tutorials:

I hope this SharePoint tutorial explains, how to Configure Retention in Document library in SharePoint 2010/2013.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

>