Unable to delete items from a list

I was onsite at a client’s site today and I created a couple of test entries in a list they had created, to test some workflow functionality. That was all well and good, until I went and tried to delete the dummy data.

Survey Says: Access Denied!

What the hell? It was getting close to the end of the day and after about 15 minutes I decided to put the issue aside and attack it the next morning with a fresh set of caffeine-enhanced eyes.

Rock up the next morning, jump in the drivers seat and go…

"Okay, so this is not standard OTB SharePoint functionality… Which means there’s probably a feature somewhere that’s trying to preserve data integrity… and it doesn’t stop me from editing the item, just deleting it, so it’s probably hooking into the ItemDeleting event or something…"

One quick look at the Features folder later (ordered by last modified) and I notice that there are several features there… but the one I’m most interested in is the one called "ManageEventHandlers" – Oooooh, I wonder what this one does!

In the feature.xml file you can normally find the description of what the feature does (which is easier than trying to find the feature and the site it’s been deployed to using the UI), so I cracked it open and – Oh happy days – The author was proud enough of their work to put a reference in there to their own site – A big cheerio to Brian Wilson from MCS UK ๐Ÿ™‚

The feature is actually a good one to have, as it lets you hook events that occur in SharePoint up to DLL code you have written – and all using the UI… but the client did not know that they were using free open-source code on their site, so the person who initially set up the site clearly had not heeded the warnings in this article.

So this time the feature in question adds a link to the settings pages of lists and libraries, called Event Receivers – this lets you pick and event, then identify an assembly and method to use when that feature gets called. In my list, there was 2 methods connected to the "ItemDeleting" event – remove them, and everything comes good ๐Ÿ™‚

The feature can be downloaded here, and the blog articles that talk through it are here, here and here (3 articles in total).

Brad

Advertisements

About Brad Saide

I'm a SharePoint consultant. I'm also slowly going bald, seem to have a permanent spare tyre around my waist and enjoy socialising with friends over a beer or 10. The last 2 may possibly be related. Started working with SharePoint when the first version was in limited beta release (participated in the Technology Adoption Program while at Woolworths) and have been committed to the adoption of the technology as a business enabler ever since.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s