Posts Tagged ‘delete’

In order to delete every item from a SharePoint list using the Client Side Object Model (CSOM), it will likely be necessary to implement paging using the ListItemCollectionPosition property to avoid exceptions related to the size of the query/response.

While some of the old MSDN documentation recommends retrieving sets of up to 2000 items, I ran into problems with numbers anywhere near that large, before finally settling on a row limit of 250. Also, it doesn’t seem possible to optimize the Load method via lambda expression to retrieve just the ID field and ListItemCollectionPosition property. Maybe it is possible, but I gave up when it returned a MethodNotSupported (or something like that) exception. (more…)

I was trying to delete some content types that I had created, and removed all of the lists using the types, but was still receiving the “Content┬áType In Use” error message when I attempted to delete the type.

The resolution was to empty the Recycle Bins, both at the sub-site level and the Site Collection level. I don’t recall having to do this before, but whatever. Bad news if you are not a Site Collection Administrator I guess.