How to change/refresh appointment organizer data to add-ins task pane

161 Views Asked by At

I am working on Outlook add-in and i added the extension point of add-in from appointment organizer command surface. I have to execute some functionality in my add-ins so for that I have parsed required information from appointment organizer.

After filling the information if i open the add-in then info (e.g meeting title, meeting start/end time, location, attendees, body text etc ). It's working fine till now.

But if i have opened the the add ins and changed something in the meeting title, attendees, timing etc then it's not reflecting in the add-in untill i closed and reopen the add-in. I want data must be refreshed at real time editing, I'm using getAsync api and calling this function in Office.initialize = function(reason) but it's not refreshing.

function getMeetingTitle() {
     item.subject.getAsync(
     function (asyncResult) {
          if (asyncResult.status == Office.AsyncResultStatus.Failed) {
                  write(asyncResult.error.message);
     }else {
            console.log('The start time in local time is: ' + asyncResult.value);
            $('#meetTitle').text(asyncResult.value);
     }
});
}

enter image description here

1

There are 1 best solutions below

2
AudioBubble On

The Office.initialize function is only called once when the add-in is initialized. Unfortunately you can't add a handler for item.subject change, your only way is to periodically call getAsync() on whichever property you want.