Thursday, June 3, 2010

How to handle the checkedout items when modifying Sharepoint Listitems


Im sure you might not get what this post is all about by just looking at the title, so i give you with the scenario you might be into and then you can go through the complete post
scenario :
I have a requirement for a tool that should update the metadata(sitecolumns value) of the document library/list items programatically.Everything is pretty clear except about the items that are checked out, that you get when you ponder ;-)
I can get the tool in fly if i ignore the items that are checkedout. So how to deal with the checked out items?After digging into the setttings of the library i thought disabling the version settings would do the trick but i get only the error "you cannot edit the properties when the document is checked out" when trying to edit the items that are already checked out by other user
Though after using the method SPListItem.SystemUdpate() i can do nothing about the checkedout items. More strategically im left with the only option to run the tool/code untill there are no checkedout items i.e i got a scheduled timer job that will run this code/tool untill no checkedout items.
Plz let me know if there is something else that you got working.Thanks!
P.S more about SPListItem.SystemUpdate() here.


No comments:

Post a Comment