HomeSharePoint On PremSharepoint Solution Series – Inform by email after 3 years that a...

Sharepoint Solution Series – Inform by email after 3 years that a request has been is validated

Business objective

Once a Vendor Qualification Request is validated, the business team shall receive an email after 3 years informing that the request is about to expire. This solution can be achieved by a super user as it doesnt require programming skills.

Technical solution

How to trigger an email after X days or X years using SharePoint Out of the box features ?

Create a sharepoint custom list, configure the form. Once validated a workflow is trigged to get approval (this is not covered in this tutorial)

To trigger an email after three years multiple solution could be used :

  1. Powershell or Console application code that run every day, checking the current date and the validated date
  2. Workflow that wait during three years
  3. Retention policy (configure the list to trigger a SharePoint 2010 Workflow after 3 years)

The solution three is to me the best as it is the quickest, safest. Solution 1 requires more development time and potential bugs. Solution 2 is exposed to platform crash and so on failure.


Create the workflow that email

Create a SharePoint 2010 type workflow (2013 workflow type is not supported), that send an email, name it Inform about expiring.

Configure the retention on the list

  1. Navigate the the list settings, click Information management policy settings
  2. Click Item
  3. Click Enable Retention

  4. Click Add a retention stage as below, set 0 days for testing purpose (you dont want to wait 30 days J), select the workflow that shall trigger (in that case we created a SharePoint 2010 workflow that triggers an email)

Configure expiration job timers

You must change the job timers, otherwise it might take 7 days to trigger, as it is by default configured this way :

  1. Navigate to Job timer definition in the central administration
  2. Search information management policy of your web application
  3. Change to minutes, 1 minutes

  4. Search Expiring policy timer job, set it to 2 minutes

Wrap up

Configuration are done, now create a list item and wait 5min, an email shall trigger.

Each time you modify the workflow, you have to navigate back to the retention rule and select the last version of the workflow.

To finalize the solution, modify the retention stage with the correct timing (in my case : Create date + 3 years) and set the timer job to daily, run the expiration job before the information management policy one

- Advertisement -


Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.



Recent Comments