Skip to main content
How can I update WSS document library column data from my process? For example, I have a column for Status in the document library. Once the process proceeds to the "next step" the status will change (i.e., process is executed Status = Draft --- process is at Review activity Status = Under Review).
Hi Tammie,

What you can do is to name the Activities and update the value of the column in SharePoint with the name of the Activity K2.net side.

For example:

If the process enters the 'Approval' activity you add a 'SharePoint 2003 Document' event to the Activity. In this event you select to 'Set' the metadata and select to assign the value of your status datafield. (Assuming you have populated this datafield with some data e.g.

K2.ProcessInstance.DataFields["Status"].Value = K2.ActivityInstanceDestination.Activity.Name.ToString();

which sets that Status datafield equal to the Activity name it is in.)

Every time you need to set the stage the process is in you will need a 'SharePoint 2003 Document' event to set it for you.

Hope this helps.
Just one more thing...

While the document is checked out / opened by the user K2.net will not be able to set the column data for the document... You will receive an error that the document is locked for editing.

The problem is that SharePoint will not allow you to modify anything while the document is open.

You can follow the method described in KB000091 to get around the problem:

http://kb.k2workflow.com/Articles/KB000091.aspx
The problem I was experiencing was due to the document being checked out. I appreciate the details of the post you provided -- Thank you so much Conradk2!!

icon-quote.gifConradk2:


You can follow the method described in KB000091 to get around the problem:

http://kb.k2workflow.com/Articles/KB000091.aspx



Can someone explain to me how this gets around the problem of the document being open by someone else while K2 is trying to update it?


Reply