Monday, March 30, 2009

error while updating task

Today we face a strange problem.
We are facing this error

“The workflow's parent item associated with this task is currently in the recycle bin, which prevents the task from being completed.”


We are totally confuse what this error want to say.

Below is the scenario when we are getting error.

We have a requirement where admin can reassign task to of a user to another user.
So we are assigning a task to another user by changing “assign to” field of tasklist item.

When we are calling item.update() (also tried systemupdate() and updateoverwriteversion() ) we are getting this error.

But we are not able to understand why this error is coming.
Then after spending 2-3 hours we are come to a conclusin.
we are getting this error because we are trying to update task which has attached with custom content type and that content type has been inherited by workflow task item.

Even though that task is not created by workflow but if task created with content type that is being inherited by workflow task item then you can not update it directly it should be updated by workflow only.

So in our case we change the content type from workflow task item to simple task itme so that will solve our problem. But we are still not able to understand the error massage.

2 comments:

Anonymous said...

Did you check the Recycle Bin? I checked ours and deleted the items and re-tried the process.

Seemed to work after that.

Emmanuel said...

I encountered the same problem even after simply emptying the recycle bin. Finally deleted all the Tasks and then emptied the recycle bin which resolved the issue. So delete tasks and then empty recycle bin.




Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com