0
votes

I added a workflow to my document library (with a custom content type) and now my content types event receiver function itemcheckingin doesnt fire. Double checked my xml files and it's being properly refered to and other events (itemupdating, itemadding) are firing. Any ideas?

3

3 Answers

1
votes

Have you tried programmtically pulling down a list of Event Receivers using something like SPList.EventReceivers and seeing if the correct events are bound to your receiver? Sometimes the XML files don't show exactly what the database is holding.

-Shaun

1
votes

Is your list item definitely of the content type that has the registered event handler? It sounds like you might have created a new item of the workflow-containing content type where that content type does not have a handler for the event of interest. I guess I interpret your post as saying that you now have two content types -- one with the workflow and one with the event handler.

I second @SCMcDonnell's suggestion to go straight to the horse's mouth and see what event receivers are registered for your list item and its content type.

EDIT: Oh, I guess I initially missed your claim that other events are firing successfully. That makes my answer less likely. Still, I recommend that you go specifically retrieve the event receivers for the offending list item.

0
votes

Does the list have force checkout on it?

If it does, then the checkin fires and ItemUpdated as well. See this KB article

http://support.microsoft.com/default.aspx/kb/939307

if (properties.AfterProperties["vti_sourcecontrolcheckedoutby"] == null && properties.BeforeProperties["vti_sourcecontrolcheckedoutby"] != null)
        {
            //This is when the update event is triggered by check-in.
        }
        else
        {
            //This is triggered by events other than check-in action.
        }