I have a number of content types with Document as a base. Each of these content types has their own unique behavior and therefore each one has an event receiver. This works perfectly fine except for the ItemDeleting method. When I delete an item of any of the children content types or a Document it calls every event receiver rather than the specific one for the content type.

I have tried specifying a GUID at the top of the file and adding it to the content type definition but it still calls every. single. event. receiver. I know I can just add a check within the file to see if it is the correct content type but this seems like an inelegant solution and I may as well just make one event receiver for the document library and check the content type there.

Has anyone else experienced this problem and come up with a (more elegent) solution?

  • Take a look at sharepoint.stackexchange.com/questions/30602/… – Amal Hashim Jan 8 '15 at 21:11
  • Thank you :) I've had a look through this question and tried the proposed solution by adding a GUID, unfortunately it did not work for me. Was hoping that someone had found a solution in the two years between these questions :P – Zoosmell Jan 8 '15 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.