0
我希望在复制操作被激怒时增加元数据。Sharepoint-Property在ItemAdded事件中标识文档/项目的来源
public override void ItemAdded(SPItemEventProperties properties)
{
try
{
this.DisableEventFiring();
SPSecurity.RunWithElevatedPrivileges(delegate()
{
string oid = string.Empty;
using (SPWeb web = properties.OpenWeb())
{
SPList list = web.Lists[properties.ListId];
SPListItem item = list.Items[properties.ListItem.UniqueId];
String Source=item.CopySource.toString();
}
});
}
Catch()
以下项目> copysource返回空字符串 所以这对我来说很难检查wheter事件已触发由于复制操作
您可以提供有关文档如何被复制的更多信息?至少在WSS中,我能想到复制文档的唯一方法是使用Windows资源管理器。 – 2010-10-06 20:53:10
另一种方式是通过发送到其他位置选项 – 2010-10-14 11:59:55
和另一种方式是通过内容和结构 - >操作 - >移动/复制 – 2010-10-14 12:00:31