.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to delete the contents of the Workflow History List

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :SharePoint

I'm trying to purge the contents of the workflow history list which has thousands of comments added by the some workflows (I will fix the workflows later!). I'm worried that the huge number of entries in this list is slowing down the site performance. At this stage I do not need any of these entries for any audting or other purpose. I'm not sure of the best way to go about this.

My current strategy is to rely on the workflow autoclean sp timer job, after first running some code to set the AutoCleanupDays property of the SPWorkflowAssociation. I'm hoping that once I have run this on all the document libraries in my site where workflows have been run I will then be able to delete the Workflow History list using the Sharepoint Web UI "Delete this list" hyperlink.

When I do this at them moment I get an error as below:


Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT))   at Microsoft.SharePoint.Library.SPRequestInternalClass.DeleteList(String bstrUrl, String bstrListName, UInt32 dwDeleteOp, Guid& pgDeleteTransactionId)
   at Microsoft.SharePoint.Library.SPRequest.DeleteList(String bstrUrl, String bstrListName, UInt32 dwDeleteOp, Guid& pgDeleteTransactionId)

View Complete Post

More Related Resource Links

SPField of WorkflowEventType in the Workflow History List has value Workflow Initiated but when i ed


hi all

how are you

i wish anyone could help me in this problem

i have a sharepoint sequential workflow created in visual studio

when the workflow starts i log into the workflow history list that workfow is started using the LogToHistoryListActivity

i entered the hidden workflow history list from the browser for example:


i noticed that an item is created in the above list when i run my workflow

the field Event Type in the item above has the value of Workflow Initiated but when i edit the item i noticed that the field Event Type has a value of 0

so can anyone tells me how this field works and from where it is getting itsvalues

thanks a lot


Workflow History list - Huge number of entries.


Hi there,

Does anyone know if there is an issue with having a large number of entries in the workflow history list. I've got 2 sites that have only been in existence for 9months and the workflow history lists are already at 14000 entries?

Is this list size an issue?

Would growing at this rate cause an issue in the future?

Is there anything we could do about it? settings, delete routines..

Any ideas/suggestions gratefully received!



Information Management Policy to clean up the Workflow History List?


I have several InfoPath 2007 forms (with workflows) that are heavily used in my MOSS 2007 environment, and the some of the Workflow History lists are very large need to be cleaned up.  I'm trying to use an (Expiration) Information Management Policy to delete items in the Workflow History list that are Last Modified + X days , but haven't had much success.  Has anyone else had success doing this?


Delete not working on List.aspx - out of box



I'am trying to use Dynamic data web site on my project. I have Visual Studio 2010 enf Framework 4.0. I create the default project with the wizard. I add my own Entity Data Model.

When I try to use the "delete" autogenerated button on List.aspx, on the table ServerSetting (see image below), I receive a null exception.  I have no custom code involved in this operation and cannot seem to determine what is Null.

Any help would be appreciated!



[NullReferenceException: Object reference not set to an instance of an object.]
   System.Data.Objects.Internal.ForeignKeyFactory.CreateConceptualNullKey(EntityKey originalKey) +30
   System.Data.Objects.DataClasses.EntityReference.NullAllForeignKeys() +722
   System.Data.Objects.EntityEntry.NullAllForeignKeys() +235
   System.Data.Objects.EntityEntry.Delete(Boolean doFixup) +77
   System.Data.Objects.EntityEntry.Delete() +9
   System.Data.Objects.ObjectContext.DeleteObject(Object entity, EntitySet expectedEntitySet) +169

Attach Workflow to Task List, don't get option to manually start workflow via dropdown on task item



I am running WSS 3.0 with other workflows which are functioning correctly.  I created a new workflow in Visual Studio 2008 and was able to successfully run it in my dev environment.  I attached the workflow to a task list in my dev environment and was able to manually start the workflow by using the drop down workflow option and using the menus to manually start it.  I installed this workflow in our production environment and attached it to the task list (which had a SPD workflow attached to it which stopped working about a month ago).  I made sure that the option to manually start the workflow was checked.  When I tried to manually start the workflow, (hover mouse over title, drop down) there isn’t a workflow option.  The workflow also will not start automatically when a task is changed.


I attached this same workflow to a different task list in production and get the option to start it.


I have tried creating a small workflow in SPD 2007 and attaching it to the task list.  It shows that it is attached, when I look at the workflows that are attached to the task list, but I still don’t get the option to manually start it.


I have checked my security and I have fu

Trying to send email using Sharepoint Designer 2007 workflow and email enabled list


I have a a list that recieves email. I have few fields that shows me the originator: "E-Mail From" and "E-Mail Sender".

I am trying to create a workflow that will generate an auto reply to the originator but the SPD fails to recognize the email address in these two fields. It's either truncating part of it or uses the html ( href=mailto:Demo@DemoSomething.com) in the To field.

Thank you,


Workflow field not being added to list or views when adding a workflow


This problem just started happening in my entire site collection.  Anytime I associate a workflow to any list or doc lib the Workflow column that shows the status and links to the history is not beind added to the list or any views and is nowhere to be found.   Here's exactly what I'm doing:

1.  Go the List settings -> workflow settings -> add a workflow (for this example the OOB approval workflow)

2.  After adding I go to the List, the workflow column doesn't exist.

3.  I go to "modify view", and the workflow column is not listed in the available columns.

Any help is greatly appreciated.

Workflow Task And Relevant List Item


Hello there...

1. What is the name of  the field thats connect between the task item and  the list name or guid and the list item id or guid

2. SPD: how can when starting the workflow how can i ensure that the initial form variables will be saved at the workflow task list

Many Thanks



Assigning users when creating a list item in a workflow


I'm using a workflow to assign tasks to users.  When I try to assign the task to a group (set in the workflow designer), the workflow gives me an error.  When I change the assign to property to a single user, the workflow works perfectly.  How do I get the workflow to assign the task to the group?  Or if that's not possible, can I get it to assign it to more than one user?


Delete list items en masse?

Is there a way to delete list items en masse from a SP list?  I am on MOSS 2007.  In order to use a particular site as a site template I had to save with content and I don't want the content.

Workflow doesn't work anymore after renaming list

Hi All, I have created a list with the name "helpdesk test". After testing this list i renamed the list to "helpdesk". I did the rename by the list settings.  To this list i attached some workflows, with Sharepoint designer,  that have to start when a new item is created. All worked fine but after the rename the workflows don't work anymore. When i start the workflows manually from the list all works fine. Is there a way to rename a list and let the workflows work as before? Thanks in advance. Laurens.      

Updating a List item field value in a SPD Workflow is setting Date fields to null

Hello everybody,I faced a very weird behavior while creating a workflow in SPD against a Document Library.Here is the case:1- Create a document library in sharepoint site.2- Add a custom column of type DATE.3- Upload any document to the library4- Edit the item metadata and set the custom date field to any date you want.5- Now using sharepoint designer, create a very simple Workflow with only one action that updates the current item "Title" field to any value. (Note: In my case I set the workflow to start manually and not automatically)6- Save the workflow and then start it on the uploaded item.7- Now check the value of the date column after the workflow is finished.8- You will see that the Date field is Empty... (very weird)Notes:   1-This behavior will not appear on a standard list. it is only appearing in a Document library.  2- I am using WSS 3.0 SP2 + MOSS 2007 SP2. Also SharePoint designer 2007 SP2Did anyone face this situation and does it have a fix, or am I doing something wrong here... Please help.Regards,Maheed

Cannot delete custom column in calendar list - 'unknown error'

I've created a column in a calendar list and now cannot delete it.  I've cleared all data and I still get the "Unknown Error" message when I try to delete. jan

can a Workflow access a stored procedure and pass the parameters from the list data to the stored pr

The reason that I would like to consider this functionailty is because my table architecture is complicated and I do not want to modify my master table to accept all of this data where some of the data should be normalized into sub tables.  Has anyone see evidence of the stored-procedure parm approach?  Is this best accomplished through VS 2010 or can I do it through SPD? Thanks

how to change the permissions list items using the workflow?

How to change the permissions list items using the workflow? Or how to instull SPDActivities on sharepoint 2010?

Making an Exchange Distribution List an Approver for a Workflow step

I have a client that has an Exchange Distribution List populate by a team of specific stakeholders. They want a workflow that includes the Distribution List as an approver so that everyone in that DL has to approve before it moves on to the executive steering committee. What are the proper steps to making an Exchange DL a approver to a workflow in MOSS?  silly rabbit, tricks are for kids!

Cannot delete rows in a list via Lists web service's UpdateListItems-function, even though I am abl

Hi all, I'm trying to delete some rows in a SharePoint 2010 Foundation list via Lists.asmx -web service's UpdateListItems. The web service is called from BizTalk. I am able to create rows, but for some reason delete fails. I also use "GetListItems"-function without problems. The exception I get is Microsoft.SharePoint.SoapServer.SoapServerException. The message is "Cannot access a closed Stream." The updates-element of the UpdateListItems-function is as follows (well, a part of it, the real one has more Method-elements, but you get the gist..): <Batch OnError="Continue" ListVersion="1"> <Method ID="1" Cmd="Delete"> <Field name="ID">1900</Field> <Field name="IMEI">GFA-687</Field> </Method> <Method ID="2" Cmd="Delete"> <Field name="ID">1901</Field> <Field name="IMEI">OVG-567</Field> </Method> <Method ID="3" Cmd="Delete"> <Field name="ID">1902</Field> <Field name="IMEI">OXI-570</Field> </Method> </Batch> I've also tried that Batch without the IMEI-information, as well as with a valid ViewName. Why cannot I delete when I can clearly modify/create rows - what's up with th
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend