外部列表可以有事件接收器吗 [英] Can an external list have event receivers

查看:42
本文介绍了外部列表可以有事件接收器吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SharePoint 2010 支持外部内容类型和外部列表.我想知道是否可以将事件接收器附加到外部列表或外部内容类型.

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.

这是我想要做的:

  • 我有一个链接到 SQL Server 中的表的外部内容类型产品"
  • 在通过 SharePoint UI 添加产品时,我希望触发事件接收器以自动创建与产品同名的文档库

我知道如何编写事件接收器,但由于我目前无法访问 SharePoint 2010 环境并且我正在检查项目的技术可行性,我想知道是否可以附加事件外部列表的接收者.

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.

问候,

汤姆

推荐答案

似乎不可能.尽管您可以将事件处理程序附加到外部列表,但它不会被执行.外部列表的工作流设置也在 SharePoint 用户界面中显示为灰色.

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.

解决方法似乎是在 Visual Studio 中创建外部内容类型.这样你就可以在 create 方法中添加一些代码来做一些额外的事情.

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.

这篇关于外部列表可以有事件接收器吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆