无论如何,在从一个文件夹到另一个文件夹的移动操作期间添加ExtendedPropertyDefinition。 [英] Is there anyway to add ExtendedPropertyDefinition, during move operation from one folder to another folder.

查看:161
本文介绍了无论如何,在从一个文件夹到另一个文件夹的移动操作期间添加ExtendedPropertyDefinition。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


环境 : 
-



Exchange Server: -
Exchange Server 2010 SP3


< p style ="margin-bottom:0.0001pt; padding-right:0px; font-size:14px; vertical-align:baseline; list-style-type:none; font-family:'Segoe UI','Lucida Grande' ,Verdana,Arial,Helvetica,sans-serif; line-height:21.5319995880127px; color:#2a2a2a; background:rgb(242,242,242)">
EWS API: - 2.0



IDE: - Visual Studio
2008



语言: - C#





要求
-



我正在尝试添加  ExtendedPropertyDefinition  在项目的移动操作期间。到目前为止,它无法正常工作。以下片段,
我用过



 //获取属性集的GUID。
Guid MyPropertySetId = new Guid(" {C11FF724 -AA03-4555-9952-8FA248A11C3E}");

//为扩展属性创建定义。
ExtendedPropertyDefinition extendedPropertyDefinition = new ExtendedPropertyDefinition(MyPropertySetId," EWSProcessStatus",MapiPropertyType。字符串);

//将扩展属性添加到名为"message"的电子邮件对象中。
message.SetExtendedProperty(extendedPropertyDefinition,1);


我正在从收件箱文件夹中读取邮件;执行一些操作并转移到 SUCCESS
文件夹(用户定义)。在移动之前,我想设置一些属性来邮寄。






请帮助,我会真的是
感谢。




问候,SP辛格

解决方案

您无法添加任何内容作为MoveOperation的一部分,因为Move Operations只是告诉服务器您要将项目X从a移动到b。你需要做的是在前面或后面移动添加,例如你的例子,这意味着在你调用Move之前调用更新方法
的消息。


干杯
Glen


Environment:  -

Exchange Server: - Exchange Server 2010 SP3

EWS API: - 2.0

IDE: - Visual Studio 2008

Language: - C#

.

Requirement: -

I am trying to add ExtendedPropertyDefinition during move operation of item. Till now, it is not working. Following snippet, I have used

  // Get the GUID for the property set.
                Guid MyPropertySetId = new Guid("{C11FF724-AA03-4555-9952-8FA248A11C3E}");

 // Create a definition for the extended property.
                ExtendedPropertyDefinition extendedPropertyDefinition = new ExtendedPropertyDefinition(MyPropertySetId, "EWSProcessStatus", MapiPropertyType.String);

 // Add the extended property to an e-mail message object named "message".
                message.SetExtendedProperty(extendedPropertyDefinition, 1);

I am reading mails from inbox folder; perform some operation and moving to SUCCESS folder(user defined). Before moving, I want to set some property to mail.

.

Kindly assist, I will be really thankful.


Regards, S.P Singh

解决方案

You can't add anything as part of the MoveOperation as the Move Operations just tells the server you want to move Item X from a to b. What you need to do is either make the addition pre or post move eg in you example that would mean calling the Update Method on message before you call Move.

Cheers
Glen


这篇关于无论如何,在从一个文件夹到另一个文件夹的移动操作期间添加ExtendedPropertyDefinition。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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