This SharePoint 2013 workflow tutorial explains, how to delete a list item after a specific duration using SharePoint designer workflow in SharePoint 2013/Online. Here my requirement is the item should be deleted automatically after a certain duration in SharePoint.
Here I have 2 things, the first one is I wanted to delete the workflow on some days like 45 days or 60 days. The second option is that the SharePoint list item has an expiration data column and the item should be deleted on that date.
There is two Pause action available in a SharePoint 2013 designer workflow:
- Pause for Duration
- Pause until Date
Pause for Duration SharePoint Designer Workflow Action
By using Pause for Duration SharePoint action you can pause for a number of days or number of hours or for minutes. By default, in the beginning, it appears like Pause for 0 days, 0 hours, 5 minutes. In this example, I have set it for 30 minutes. After this Pause action, I have another action to Delete Item where I have selected the current item. See the fig below:
The list item got deleted after 30 min.
Pause until Date SharePoint Designer Workflow Action
By using this workflow action, we can pause the workflow until a particular date. By default, it comes like Pause until this time. In this action, we set to Current Item: ExpirayDate, where expiry date is our custom column name. And after that, we have the Delete Item action which is set to Delete the Current Item. The workflow looks like below:
So when the expiry date reached, the SharePoint list item will get deleted.
You may like following SharePoint workflow tutorials:
- Step by step develop workflows using visual studio 2015 as an add-in and deploy to host web in SharePoint online
- SharePoint Online Site Workflow and Initiation Form Parameters example using SharePoint designer workflow
- How to use App Step Nintex Workflow Action in SharePoint Online Office 365
- Assign A Task Action in Nintex Workflow for Office 365 SharePoint online
- Get all workflows from all site collections using the server object model in SharePoint 2013
- App Step in SharePoint 2013 Designer Workflow
- Create Approval workflow in for SharePoint 2013 document library
I hope this SharePoint workflow tutorial explains, how to delete a list item after a specific duration using SharePoint designer workflow using Pause for Duration and Pause until Date SharePoint designer 2013 workflow actions.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SPGuides.com