Saving Custom property using OfficeJS API doesn't persist on Exchange for long time

170 views Asked by At

In outlook web add-in I have set some custom properties to the mail item, which persists only till same day, next day when I launch add-in again for same mail item all custom properties gone:

I am attaching my console log Images

Same Day when I saved custom properties to mail item Same Day when I saved custom properties to mail item

After some time or next day (I don't know actually how long it persists but for sure after some time I am getting below) enter image description here

Code I write to Save custom properties & get custom properties is below:

function loadCustomProperties() {
    Office.context.mailbox.item.loadCustomPropertiesAsync(function(result) {
        console.log("Mail Custom Properties:", result);
    });
}

function saveCustomProperties(recordId) {
    Office.context.mailbox.item.loadCustomPropertiesAsync(function (result) {
        console.log("Mail Custom Properties:", result);
        result.value.set("RegistryEntryId", "113431");
        result.value.saveAsync(function (saveResult) {
            console.log("Save Custom Property Result: ", saveResult);
        });
    });
}
1

There are 1 answers

0
Ayushi Garg On

Can you share more details for what kind of item (Appointment vs Message) you are saving these properties on?

Custom Properties are always persisted. Is there some other service that could be modifying the messages directly using EWS or any other end point?