Outlook Web加载项如何通过JS中的EWS获取客户属性

问题描述

如果我通过Outlook JS保存客户属性,如何在JS中通过EWS获取客户属性。 API

  1. 我使用以下JS代码保存了自定义属性:

       Office.context.mailbox.item.loadCustomPropertiesAsync(callback);
    
          function callback(asyncResult) {
          var customProps = asyncResult.value;
          customProps.set("isSync","test");
    
         // Save custom properties via JS API
         customProps.saveAsync(saveCallback);
        }
    
  2. 然后我想通过EWS获得这种自定义的繁荣。

情况1:

   '<t:ExtendedFieldURI PropertySetId="cecp-my manifest" PropertyName="isSync" PropertyType="String"/>' 

情况2:

   '<t:ExtendedFieldURI DistinguishedPropertySetId="PublicStrings" PropertyName="isSync" PropertyType="String"/>' 

两种方法均无效。我应该如何描述

同时,如果我使用.Net,则一切正常:

 ExtendedPropertyDefinition extendedPropertyDefinition = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings,"cecp-my manifest",MapiPropertyType.String);
 var props = new PropertySet(BasePropertySet.FirstClassProperties,ItemSchema.MimeContent,extendedPropertyDefinition);'

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)