views:

73

answers:

0

Say I have a custom field type called MyCoolField that I have deployed in a solution. This solution also contains a an SPEventReceivers that has overridden ItemAdded, ItemUpdated, and ItemDeleting. All the specifics of this particular field type are probably not super relevant, but one things to note is that inside of the "OnAdded" method it attempts to add a series of event receivers to its ParentList.

After this solution has been deployed, I activate a site-scoped feature that does nothing except add a new site content type - MyContentType. Now, I would not expect any event receivers registered anywhere, since ParentList is supposed to be null for site content types. So in yet another feature, I go add this MyContentType to a list. The question I have is whether I should expect the OnAdded method to get called now (when adding a content type to the list) or does it only get called when adding the field to list/content type? It seems like it is not getting added (the event receivers are not getting registered), but I wanted to make sure that is truly expected behavior and not something else odd going on in this environment.