office-jsoutlook-web-addinsoutlook-for-mac

Office.js: Outlook for Mac Add-In - custom properties not saved for existing object


So in my Outlook Add-In (Office.js) I'm setting some custom properties to an calendar event, using following code:

        const item = Office.context.mailbox.item;
        item.loadCustomPropertiesAsync((result) => {
            const props = result.value;
            props.set("my_prop", "some value");
            props.saveAsync((saveResult) => {
                console.log("SAVE_CUSTOM_PROP", saveResult);
            });
        });

And it works fine, on a newly created event, after I save it and open it again, I can access the custom property value using following code:

        const item = Office.context.mailbox.item;
        item.loadCustomPropertiesAsync((result) => {
            const props = result.value;
            const my_data = props.get("my_prop");
            console.log(my_data);
        });

However when I open an existing event, with or without custom properties being set, the custom properties I'm setting doesn't get saved after the user saves the event.

If I open the event again it doesn't have the new custom properties, it has either none (if none wasn't set), or the old values which were set when the event was newly created (not yet saved).

It works as expected in Outlook for PC and OWA.

Outlook for Mac Add-in support bug? I'm doing something wrong?


Solution

  • Finally issue resolved, today Outlook for Mac 15.34 is out, and it fixes that issue.

    So it was a bug on Outlook for Mac office.js support.