views:

35

answers:

1

SharePoint 2010 supports external content types and external lists. I was wondering if it's possible to attach an event receiver to an external list or an external content type.

If event receivers are not possible, a workflow would also fit the needs.

Here's what I want to do:

  • I have an external content type 'Product' that is linked to a table in SQL Server
  • When adding a product through the SharePoint UI, I want an event receiver to fire that automatically creates a document library with the same name as the product

I know how to write event receivers, but since I don't have access to a SharePoint 2010 environment at the moment and I'm checking the technical feasibility of a project, I would like to know if it's possible to attach event receivers to external lists.

Regards,

Tom

A: 

It seems not possible. Although you can attach an eventhandler to an external list, it will not be executed. The workflow settings for an external list are also grayed out in the SharePoint user interface.

A workaround seems to be to create the external content type in Visual Studio. That way you can add some code to the create method to do additional things.

Tom Vervoort

related questions