Question

I'm setting a custom extended property for each existing appointment like that:

var extendedPropertyDefinition = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, "RateTheMeetingId24", MapiPropertyType.Integer);
var propertySet = new PropertySet(PropertySet.FirstClassProperties) { extendedPropertyDefinition };
appointment.Load(propertySet);
appointment.SetExtendedProperty(extendedPropertyDefinition, meetingId);

and than I'm updating appointment:

appointment.Update(ConflictResolutionMode.AlwaysOverwrite);

it works fine, but very slow, because Update() creates a call to exchange for every appointment. I would like to update meetings in one single call. I can make list of my appointments with setted custom property and than i would like to use something like that:

UpdateAppointment(List<Appointment> appointmentsWithExtendedPropertySetted)
{
    appointmentsWithExtendedPropertySetted.UpdateAll();
}

i have found a reference in MSDN about UpdateItems method: ExchangeService.UpdateItems method

but i don't know how to use it.

Was it helpful?

Solution

I got asnwer how to solve my probem i msdn forum: update appointments in one service call

I need to set property for one appoitment at the time and then add it to batch, after i set properties for all appointments i need to use _service.UpdateItems() method for my appointments batch:

pulic void UpdateAppointments(List<Item> _updateBatch)
{
    Service.UpdateItems(upUpdateBatch, Folder.Id, ConflictResolutionMode.AlwaysOverwrite, MessageDisposition.SaveOnly, SendInvitationsOrCancellationsMode.SendToNone);
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top