I have a custom list on which all members will upload some document with some expiry date, now I need to create a workflow that warns the user before 'x' number of days from the expiry date with some custom message?

Note: I have some restrictions on SPD in my office, so answers which don't involve SPD are preferred.

  • What version of SharePoint is this? – Graham Aug 30 '17 at 13:37
  • Sharepoint Online – Vish Sep 1 '17 at 9:09

You will find below an image how you can do it using Visual Studio :

enter image description here

In this exemple the workflow will send Email daily.

In Delay you specify the duration time you wish to wait before checking again.


| improve this answer | |
  • Can you please explain further,as how to do it in VB from scratch and how to link it with my sharepoint online site – Vish Sep 1 '17 at 9:10
  • Go to Visual Studio and create a SharePoint Add-in project and select SharePoint Hosted. Inside your solution VS create a Custom list and Workflow and associate it to your list then desing your requirement on it. For more details check this link : c-sharpcorner.com/article/…. – Youssef Moumen El idrissi Sep 2 '17 at 10:42

This will NOT work 100% in Office 365 since the timer service that triggers the workflow only runs once per week. If you're ok with a bit of a delay in some cases (for O365) or you're on-prem and have access to change timer job settings, read on.

What you're looking for is under:

List Settings > Information Management Policy Settings > (Select Content Type, e.g. Document) > (check) Enable Retention > Add a retention stage...

At this point, you'll need to get creative if you can't use SharePoint Designer, since setting it to run a custom workflow that sends an email is the simplest option. I've never done it but you should be able to "Transfer to another Location" and have an alert setup in that location whenever something is added? Again, I haven't tried that approach.

As I mentioned, something that's required to make this work is to ensure the timer service that triggers these retention policies runs daily. The two timer jobs you're looking for are "Information Management Policy" and "Expiration Policy". By default they each run once per week. This isn't something you can change in Office 365, however.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.