Friday, September 06, 2013

Using retention events as reminders

In lists, we sometimes want email reminders when something is due. Maybe a contract is about to expire. Or a folder hasn’t been touched in a long time.

Using Information Management Policies we can use a datefield to initate a move or start a workflow. All built-in, although in the enterprise version of Sharepoint 2013.

  1. Create a datecolumn in your list.
  2. Create a workflow associated with the list. For example a simple email-wf. image
  3. List>List Settings>
  4. Permissions and Management>Information Management Policy Settings>Item>Enable Retention>Add a retention state
  5. Use the created date-column or another available date column, choose action. In this case the newly created workflow.
  6. Enter a listitem which is about to expire.
  7. Testrun by running timerjobs for the specific webapplication on the sharepoint server. The relevant jobs are in Sharepoint 2013 :
    1. PolicyUpdateProcessing
    2. ExpirationProcessing
  8. After all is verified to be working, it’s a good idea to change the timerjob intervals of above jobs. Default value is only once a week. Change this to daily at the appropriate time.

The timerjobs must be run in that particular order for this to work. After they have first run, for trial and error purposes, we can remove the policy and reapply to renew the policy.

Also some handy powershell for the occasion:

/> get-sptimerjob policyupdateprocessing

/> start-sptimerjob expirationprocessing

/> set-sptimerjob expirationprocessing –schedule ”daily at 07:00”

/> set-sptimerjob policyupdateprocessing –schedule “daily at 06:00”

Note that above assumes theres only one webbapplication. When there’s more the powershell needs to be targeting that specific application. Since all applications have these timerjobs.

image

References:

http://office.microsoft.com/en-001/sharepoint-server-help/create-and-apply-information-management-policies-HA101631505.aspx - general information

http://weblogs.asp.net/spano/archive/2012/03/17/sharepoint-expiration-policy-not-working.aspx

http://technet.microsoft.com/en-us/library/ff607833.aspx - start-spadminjob - seems to start all timerjobs.

http://www.danielroot.info/2012/08/information-management-policy.html - details

http://stackoverflow.com/questions/8545161/sharepoint-2010-retention-policy-not-working

http://weekbeforenext-blog.blogspot.se/2011/06/extracting-month-and-year-from-date-and.html

http://office.microsoft.com/en-001/windows-sharepoint-services-help/examples-of-common-formulas-HA001160947.aspx

http://yalla.itgroove.net/2012/09/sharepoint-calculated-column-formulas/

http://blogs.askcts.com/2013/05/14/creating-a-timed-workflow-in-sharepoint-2010/ -

http://sarahlhaase.wordpress.com/2013/03/27/setting-up-automated-reminder-emails/

https://specmgt.wordpress.com/2011/10/26/documentexpiry/ -

No comments: