javascript - 从 Outlook 加载项读取扩展属性

标签 javascript outlook-addin exchangewebservices extended-properties

我目前正在使用 EWS Managed API (C#) 在 CalendarFolder 上设置自定义 ExtendedProperties:

myCalendar.SetExtendedProperty(customExtendedProperty, true);

我还可以在绑定(bind) CalendarFolder 时使用托管 API 加载这些设置:

var myCalendar = CalendarFolder.Bind(service, folderId, requestedPropertySet);

接下来,我想读取这些相同的 ExtendedProperties,但是来自使用 Office JavaScript 库的 Outlook 加载项。

从 Outlook 库的外观来看,它没有公开 Office.context.item 的任何方法来访问 ExtendedProperties

库中是否有允许我访问它的方法?如果没有,我可以使用在 URL 路径中具有 GUID 的架构方法 ("http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/yourProp")?

最佳答案

要在插件中的文件夹上访问您自己的自定义属性,您需要使用 makeEwsRequestAsync https://dev.outlook.com/reference/add-ins/Office.context.mailbox.html#makeEwsRequestAsync在您的插件中执行 GetFolder。要获得正确的 SOAP 消息,只需在您的 EWS 托管 API 代码中启用跟踪,该代码将输出使用的 SOAP https://msdn.microsoft.com/en-us/library/office/dn495632(v=exchg.150).aspx您可以将其转置。需要注意的一件事是在您的应用程序中创建 makeEwsRequestAsync 的安全要求,例如 ReadWriteMailbox http://dev.office.com/docs/add-ins/outlook/understanding-outlook-add-in-permissions

关于javascript - 从 Outlook 加载项读取扩展属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38982931/

相关文章:

javascript - Testcafe Applitools typescript - 错误 : Property 'accessibilityValidation' is missing in type

javascript - jQuery ajax 因未知原因失败

outlook - 如何理解outlook 2007数据存储的命名空间

C# Outlook 插件 - 上下文菜单处理

c# - EWS 按主题搜索约会

c# - 在构造ExtendedPropertyDefinition时应该使用GUID或DefaultExtendedPropertySet.PublicStrings吗?

c# - 我们能否减少 ExchangeWebsevice 中 AutodiscoverUrl 消耗的时间

javascript - window.print() 在每一页上重复模态

javascript - jquery: "Exception thrown and not caught"在 IE8 中,但在其他浏览器中有效

c# - Outlook 2007 加载项部署为 DLL