none
Office.context.mailbox.addHandlerAsync fails when reload the frame RRS feed

  • Question

  • I am implementing the pinnable taskpane in my outlook web add-in This is my code:

    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();
        });
    }

    Everything works fine( gatherMailItemInfo get calls when I switching between items. But as long as a do a post to the server ( can simply replicated by choosing "reload frame" in the right click menu) the handler will fail.


    • Edited by Frostless Monday, August 27, 2018 6:14 AM
    Monday, August 27, 2018 6:13 AM

All replies

  • Having the exact same issue but for some reason only in Outlook for web. It works fine in Outlook for Desktop.

    Laurence Lemmon-Warde

    Thursday, October 4, 2018 7:57 PM