Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set CustomProperties on appointment for all attendees

tl;dr

When setting CustomProperties to an appointment that has attendees, only the appointment for the organizer gets the CustomProperties. The properties do not propagate to the appointments of the other attendees.


Longer version

When we create an appointment with multiple attendees and then log in as each attendee, we notice that each ItemId is different. So, it appears that each attendee in a meeting gets their own copy of an appointment. (Would really like someone to confirm this is true).

However, when setting a custom property from our add-in (using the Outlook JavaScript API), only the organizer's appointment gets the custom property as we are unable to see the custom property when we log in as any of the other attendees.

Snippets from our code that is relevant:

Office.initialize = function (reason) {
    $(document).ready(function () {
         Office.context.mailbox.item.loadCustomPropertiesAsync (onCustomPropertiesLoaded);
    });
};

function onCustomPropertiesLoaded(asyncResults) {
    _customProps = asyncResults.value;
}

//Set custom properties
_customProps.set("myProp", "true");
_customProps.saveAsync(customPropertiesOnSaved);

Is there a way to have each copy of the appointment have the custom property?

like image 645
Cloud SME Avatar asked Aug 29 '16 23:08

Cloud SME


1 Answers

When we create an appointment and have multiple attendees and then log in as each attendee, we notice that each ItemId is different. So, it appears that each attendee in a meeting gets their own copy of an appointment. (Would really like someone to confirm this is true).

Yes that's correct an attendees copy of the appointment is a separate new Item in that mailbox. On the back end Exchange server its a separate Mailbox Store Item they are not linked in any way (other then properties that can be used to correlate them) and the server does not update appointments in attendee mailboxes so they must always be updated by a client process (in the case of room mailbox the Mailbox assistant does this but this is still a client process that runs on the server).

However, when setting a custom property from our add-in, only the organizer's appointment gets the custom property as we are unable to see the custom property when we log in as any of the other attendees.

That is most likely happening because you need to first save the custom property on the Appointment before you add any attendees and send meeting invitations. Its important to first save the appointment with the property (or attachments) before you add any attendees, then when the server produces the invites those invites should include the custom property (you can check that is happening using a Mapi editor and looking at the invite being produced in the Sent Items folder of the Organiser). Its important to remember as the appointments aren't linked on the server updating the property on the organiser won't be reflected on the attendees copy unless your sending a Meeting update and that Meeting update is then accepted by the attendees which would then update their calendars.

like image 67
Glen Scales Avatar answered Sep 20 '22 13:09

Glen Scales