1

I have a List definition in Visual Studio which is instantiated using a List Instance. This list definition has an event receiver which overrides the ListAdded event.

I am able to get the ListAdded event to fire if I create a list based on the definition through the SharePoint UI but this does not fire when the list is created using the List Instance.

Is this a bug or a feature?

Thanks,

Alex

1 Answer 1

1

I would say that it is a feature. Because a ListInstance element has to be included into a feature, you would be able to do some code behind on the FeatureActivated event of the feature...

That way, you have a more powerful control on your full solution, which you don't have with just the ItemAdded of the List events.

2
  • The problem is that the methods in FeatureActivated aren't being fired when the list is created via the ListInstance, only via the SharePoint UI. Have you or anyone else seen this?
    – James Love
    Commented Dec 22, 2010 at 15:54
  • I never had any difficulties at that level... My code is always fired when I activate a ListInstance... Even from a feature activation from code behind! Commented Dec 22, 2010 at 19:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.