SharePoint 2010 ECM Code Sample: Shared Retention Events
Use this SharePoint 2010 code sample to create a deployable farm solution that extends the information management policy shared retention policy feature.
Applies to: SharePoint Server 2010
The Shared Retention Events code sample in the RetentionEvents.zip file is located in the path C:\Program Files\Microsoft SDKs\SharePoint 2010\Samples. This sample enables the disposition of items based on shared events.
Download the SharePoint 2010 sample code described in this topic from Code Gallery.
Building and Running the Shared Retention Events Sample
The code sample was written in Microsoft Visual Studio 2010 and must be installed as a farm solution to Microsoft SharePoint Server 2010. After it is installed, the sample registers a site-level feature that can be activated on any site where SharePoint Server Enterprise Site Collection features are activated.
Building the Sample
Unzip the project and open it in Visual Studio 2010.
On the RetentionEvents project properties pane, specify the Site URL.
On the Build menu, select Deploy Solution.
Running the Sample
Navigate to the Features page of your site collection's root site and ensure that the Retention Events feature is activated.
Browse to the Retention Events list (URL: /RetentionEvents) and create Retention Event list items.
Browse to the list or library that contains the items that you want to have expired by one of these events. Create a Retention schedule from the Information management policy link on the List/Library Settings page.
Add the Retention Event lookup column.
Create a Retention schedule by clicking the Information management policy link on the Settings page for the list or library.
When specifying the stage of the Retention Event, first specify a stage recurring every month; use the Update expiration date action so that the expiration date can periodically be updated before the Retention Event is due, in the case that the event date is changed.
Specify a retention event for items in the Edit Properties page; those items will expire based on the schedule specified and the event date.
See Also
Concepts
Enterprise Content Management (ECM) Code Samples for SharePoint Server 2010
Developing with SharePoint Server 2010 Records and eDiscovery Features (ECM)
Records Management Programming Model in SharePoint Server 2010 (ECM)