1

I would like to build a workflow that deletes an listitem after 7 days. enter image description here

Unfortunately I am not not sure if this will work? Could perhaps someone clarify?

  • 1
    I think SharePoint retention policy / Information management policy would be good option to use instead of workflow for this scenario. – Rohit Waghela Apr 16 '18 at 12:12
  • @RohitWaghela Do you have an guide to perform this via Information management ? – Batistuta Apr 16 '18 at 12:19
  • Refer the answer for steps to set retention policy. But make changes in your policy according to your need. – Rohit Waghela Apr 16 '18 at 12:51
7

Refer following steps to set Retention / Information management policy :

  1. Goto list settings
  2. click on Information management policy settings
  3. click on Item content type
  4. tick on Enable retention check box
  5. click on Add retention stage
  6. fill out the Action and the Event
  7. Click OK
  8. Done

Remember this retention policy will not run immediately after you are done with the set up. Because "Information management policy" and "Expiration policy" are the 2 timer jobs which are responsible for retention policy.

You can check when the job is scheduled to run. refer this link - https://social.msdn.microsoft.com/Forums/sharepoint/en-US/e6625f27-48ad-4594-8694-b9b33f4cda57/when-do-retention-policies-run-by-default?forum=sharepointdevelopmentprevious

Refer following link on how to set retention policy for more information(But you will have to make changes to your policy according to your need):

Link 1

Link 2

Link 3

  • I have created the 'Information management policy' on the site collection and added the Policy on the content type: Item. But still the item do not get removed. Regarding 'Remember this retention policy will not run immediately after you are done with the set up. Because "Information management policy" and "Expiration policy" are the 2 timer jobs which are responsible for retention policy. ' Where do I find them? – Batistuta Apr 19 '18 at 8:37
  • Run the Information management policy job and then Expiration policy job manually from central admin. Path for this is--> Central Admin -> Monitoring ->Review job definitions-> Find "Information management policy" and "Expiration policy". – Rohit Waghela Apr 19 '18 at 9:21
  • Try this and check if it works :) – Rohit Waghela Apr 19 '18 at 9:22
  • Hi! I have not been able to find this in sharepoint online? – Batistuta Apr 19 '18 at 13:05
  • These timer jobs are controlled by Microsoft, you may need to wait until the timer jobs run. Refer this link - social.technet.microsoft.com/Forums/office/en-US/… – Rohit Waghela Apr 19 '18 at 15:54
0

The OOTB way to do this would be to create your workflow as you want it and add a stage at the end. In this stage put in a Pause action. You can set this for 1 day (or 24 hours). For your Transition to stage, have it redirect back up to the first stage. In the first stage do a check to see if create date is less than today minus 7 days. If true use the delete action to delete current item. don't put an else on this as it will need to run thru to the next stage to pause again if its not been 7 days.

  • I personally agree with a retention policy as a better solution but if that is not viable the steps above should work. – Shane Gib. Apr 16 '18 at 12:58

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.