我的事件接收器成功部署,但是没有结果 [英] My event reciever is deployed succesfully, but there is no result

查看:56
本文介绍了我的事件接收器成功部署,但是没有结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在共享点的事件接收器中,我想要:

In my event receiver in sharepoint, I want:

1.如果用户添加了一个项目,则事件接收器代码应在for循环中检查项目本身是否包含任何附件,应将附件的名称更改为(附件名称本身 创建于-date-).我做了一个for循环来遍历所有项目,第二个for循环来遍历单个项目中的所有附件.

1. If the user added an item, the event receiver code should check in a for loop if there is any attachment in the item itself, it should change the name of the attachment to (the attachment name itself is created on -date-). I made a for loop to go through all items, and second for loop to go through all attachments in single item.

这是我的代码,我构建并成功部署了它.但这并没有给我任何错误.有人可以帮我吗?

This is my code, I build it and deploy it successfully. But it doesn't give me any error. Can any one help me?

使用系统;
使用System.Security.Permissions;
使用Microsoft.SharePoint;
使用Microsoft.SharePoint.Utilities;
使用Microsoft.SharePoint.Workflow;
使用System.Collections.Generic;
使用System.Linq;
使用System.Text;
使用System.Threading.Tasks;
使用Microsoft.SharePoint;
using System;
using System.Security.Permissions;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint.Workflow;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.SharePoint;

推荐答案

我认为,在这种情况下,我们需要使用EventFiringEnabled.

I think, we need to play with EventFiringEnabled in this type of cases.

请点击以下链接,这可能会对您有所帮助:

Please follow the below link, it may help you:

谢谢

Siva

这篇关于我的事件接收器成功部署,但是没有结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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