Solved

Document detention workflow

Posted on 2014-07-26
6
270 Views
Last Modified: 2014-08-03
Hi,

I have  a document library in SharePoint 2007. Periodically, we upload documents from a network share into a folder X in the document library. Now I need to set up a workflow where I need to delete these documents automatically 10 days after they are posted. I don't want to delete the parent folder that the documents are contained in. I only want to delete the documents.

Is there a way to set this up using "Pause Until Duration" workflow condition in SharePoint Designer?

Any help is greatly appreciated.

Thanks,
0
Comment
Question by:Techsavy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 29

Expert Comment

by:QPR
ID: 40223557
I assume we are talking about deleting the files in the doc library and not the network share?
Have an automatic workflow (runs when a new item is added) that calculates the difference between today + 10 days.
Then pause the workflow until that date rolls around. Delete the file.
0
 
LVL 29

Expert Comment

by:QPR
ID: 40223560
This is SP 2010 but should be the same
http://office.microsoft.com/en-nz/sharepoint-designer-help/workflow-actions-in-sharepoint-designer-2010-a-quick-reference-guide-HA010376961.aspx

Look at the text for:
Add Time to Date
Pause until Date
Delete Item

If the person who triggers the workflow (the person who uploads the doc) does not have delete permissions then also look at inserting an impersonation step so that the action can be carried out under another security context
0
 

Author Comment

by:Techsavy
ID: 40225967
Hi QPR,

I am sorry it is my fault that I did not explain the problem correctly.

The workflow should automatically trigger on every newly created item so the folder or document library will not contain any documents that are more than 10 days old. so there is no human intervention. In that case do we need impersonation step?

Second, instead of setting this workflow on entire library is it possible to set up this workflow on all the items that belong to a particular folder or folders?

Thanks
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 29

Accepted Solution

by:
QPR earned 500 total points
ID: 40226009
No human intervention is required to trigger the workflow - you set the workflow to run when "a new item is added"
The workflow will auto-start, pause until the required date, auto-delete the item.
Impersonation is only required if the account that added the new doc does not have permission to delete items (probably will if using standard contribute permissions)

I don't think you can specify a workflow only run for items in a particular folder. You could add some logic to the workflow (and I'm guessing here) to check for the parent url maybe but I've never tried this.
0
 

Author Comment

by:Techsavy
ID: 40227294
I need help on this to determine if we can do this on a particular folder.
0
 
LVL 29

Expert Comment

by:QPR
ID: 40227755
I don't this is possible, you may have to use a separate library. Workflows are library specific
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently came across an issue with a MOSS 2007 deployment where access into some sub-sites were denied, even for the MOSS farm administrators. A bit of background to the setup of this MOSS farm; this was a three server setup, consisting of a fr…
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question