i'm setting custom extended property each existing appointment 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 i'm updating appointment:
appointment.update(conflictresolutionmode.alwaysoverwrite); it works fine, slow, because update() creates call exchange every appointment. update meetings in 1 single call. can make list of appointments setted custom property , use that:
updateappointment(list<appointment> appointmentswithextendedpropertysetted) { appointmentswithextendedpropertysetted.updateall(); } i have found reference in msdn updateitems method: exchangeservice.updateitems method
but don't know how use it.
i got asnwer how solve probem msdn forum: update appointments in 1 service call
i need set property 1 appoitment @ time , add batch, after set properties appointments need use _service.updateitems() method appointments batch:
pulic void updateappointments(list<item> _updatebatch) { service.updateitems(upupdatebatch, folder.id, conflictresolutionmode.alwaysoverwrite, messagedisposition.saveonly, sendinvitationsorcancellationsmode.sendtonone); }
Comments
Post a Comment