Wednesday, November 12, 2008

Error 0x80004005 while deleting a list field

A quick Sharepoint tip: While calling the UpdateList method of the Lists.asmx web service, you may receive a "Operation Failed" message while attempting to delete a field (with an error code of 0x80004005). One potential cause of this generic error message is that you are trying to delete a read-only field.

The work around for this problem is to simply update the field's ReadOnly property with a value of False using the same method before again calling UpdateList to delete the field.

Update: Another note- you can use the configuration page (http://site/_layouts/FldEdit.aspx?List=<listguid>&Field=<fieldname>) to quickly diagnose any delete field problems you are having as it seems to do a much better job of relaying descriptive error messages than the UpdateList web service does. Even though hidden and read-only fields may not be available through the sharepoint GUI, you can still access them by simply formatting the FldEdit.aspx page querystring as above.

1 comments:

John said...

Thanks so much for posting that update!

I have been struggling for weeks trying to find a way to delete my 'Integer' typed fields to no avail. I found this post one day before I travel to deliver my SP solution to high profile customer and this has been a thorn in my side for so long because I mistakingly created a bunch of 'Integer' columns and then had no way to clean them up.


THANK YOU * ( 1 / Lim x -> 0 )

You have truly made my day!