1

我正在我的 Outlook Web 插件中实现可固定任务窗格这是我的代码:

Office.initialize = function (reason) {
    $(document).ready(function () {
        // Listen to ItemChanged event
        Office.context.mailbox.addHandlerAsync(Office.EventType.ItemChanged, itemChanged, function (result) {
            console.log(result)
            if (result.status === Office.AsyncResultStatus.Failed) {
                // here will be hit if I do a postback in the server, could also be replicated by choosing "reload frame" in the right click menu
             {name: "Internal Error", message: "An internal error has occurred.", code: 5001}
            }
        });
        gatherMailItemInfo();
    });
}

一切正常(gatherMailItemInfo当我在项目之间切换时得到调用。但只要post对服务器执行操作(可以通过在右键单击菜单中选择“重新加载框架”来简单地复制)处理程序就会失败。

我正在使用 Office 365 进行测试。Windows 桌面客户端没有此类问题。

4

0 回答 0