I have list that having data stores dynamically once the infopath form has been submitted. I want to archive this data after 30 days of creation date of any data. can you please suggest how would i do this. see i can do this by workflow but how can i set the condition that once 30 days complete after creation of any list it will automatically copy into other list.
相关问题
- Sharepoint multiple connections to a web parts
- Trouble with OR in Sharepoint CAML
- List Microsoft Sharepoint Sites with Microsoft Gra
- How to use VBA or Powershell to export lists from
- redirect using itemreceiver sharepoint
相关文章
- File Upload to SharePoint 2013 using REST API
- Passing file object to Web API from Javascript
- How can I iterate recursively though a sharepoint
- SharePoint, VirtualPathProviders and Application R
- Saving a document to SharePoint brings up “Web Fil
- SharePoint SOAP GetListItems VS jQuery - How to us
- Trying to upload files to subfolder in Sharepoint
- Sharepoint client GetFolderByServerRelativeUrl fol
I believe you can simply use standard out-of-the-box workflow activities to do this - no need for timer jobs or console apps.
Using SharePoint Designer, create a new workflow (New -> SP Content -> Workflow). Specify the list to attach the workflow to.
Specify that the workflow should start on item creation only.
In the first Step, add an action: Pause for duration. Make the duration 30 days.
Add another action: Copy list item. Specify the list to copy to.
Optionally: create a third action: Delete list item if you want the original item to be deleted from the original list.
And I think that's it :)
Potentially the easiest solution is to create a console application that you schedule to run on the SharePoint server (an alternative to creating a timer job).
Depending on how you want to archive the data, you could:
First I would want to question WHY you want to move it to another list?
Why not simply setup a view on your main list showing only records created in last 30 days :-
(And yes, you can use Today in view filters)
you have to crate a timer job which runs daily and move the items which are one month old
The best way to proceed is to create a timer job and define the criteria (like when should it be running) while creating the job. We have a very helpful post by SharePoint MVP here on how to create custom jobs. Note, you can test the job and business logic for shorter duration and if it works fine, you can simply extend the job duration for 30 days.
Its very simple, all you have to do is to define your 'copying list' logic in the Execute method of job class. Good luck
There's a limit on number of items in a list of 5000 items and if you change this in administration you'll kill performance. There are perfectly valid reasons to want to archive old items off of a rapidly growing list. exceeds the list view threshold 5000 items in Sharepoint 2010