【问题标题】:CustomProperties set by Office-JS Outlook addin not shared between OWA & Outlook client由 Office-JS Outlook 插件设置的 CustomProperties 未在 OWA 和 Outlook 客户端之间共享
【发布时间】:2017-12-21 22:13:05
【问题描述】:

我有一个基于 Office JS 的 Outlook 插件,我已在 OWA 中成功使用该插件,以及 Mac(和 Windows,当我有机会启动我的 Windows VM 时)上的 Outlook 胖客户端。

我在撰写时,我的插件在消息项上设置了一些 CustomProperties,然后保存这些属性以供以后使用。

代码看起来很像 Office-JS 文档中的示例,但这里有一个精简版供参考:

Office.context.mailbox.item.loadCustomPropertiesAsync((result: AsyncResult): void => {
    let customProperties = result.value;

    let oldValue = customProperties.get("foo);
    let newValue = Date.now();
    console.log("Old value = ", oldValue, ", setting to: ", newValue);

    customProperties.set("foo", newValue.toString());
    customProperties.saveAsync(() => {});
 });

但是,CustomProperties 的状态似乎并未在 OWA 中运行的插件和 Outlook 中运行的同一插件之间共享。

例子:

在 OWA 中编辑消息,将“foo”CustomProperty 设置为当前时间戳(我们称之为“ts1”)。 如果我关闭 OWA 会话,再次打开该项目,我看到 CustomProperty 已设置为预期值。

现在,如果我在 Outlook 中打开同一封邮件,“foo”CustomProperty 为空。

如果我随后从 Outlook 设置“foo”CustomProperty(我们称新值“ts2”),并在 OWA 中重新启动我的插件,我仍然会看到“foo”CustomProperty我在OWA中设置的初始值,即“ts1”。

CustomProperties 的文档中没有任何内容暗示这些值是针对每个客户端的,除了特定于插件之外。这只是一个错误,还是属性对插件/客户端对私有的意图?

谢谢!

【问题讨论】:

  • 欢迎来到Stack Overflow,尝试添加一些你的相关代码,然后我们就可以开始帮助你了! :)

标签: javascript office-js


【解决方案1】:

这是一个已知的错误,我们正在努力修复它。

【讨论】:

  • 感谢@Mac_Outlook_Extensibility。这是特定于 Mac 的错误,还是我也会在 Windows/OWA 之间看到相同的问题?对修复的 ETA 有任何想法吗?
猜你喜欢
  • 1970-01-01
  • 2017-04-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-12-26
  • 1970-01-01
  • 2019-12-17
相关资源
最近更新 更多