Appointment.Save and Appointment.Update always set IsMeeting to true

两盒软妹~` 提交于 2019-12-24 03:26:25

问题


I want to create appointments, not meetings:

Appointment app = new Appointment(ews);
app.Start = DateTime.Now;
app.End = DateTime.Now.AddMinutes(60);
app.Subject = "My Subject";
app.Save();
string unid = app.Id.UniqueId;
// here the unid is given to the client, that may make another call leading to:
ItemId iid = new ItemId(unid);
app = Appointment.Bind(ews, iid, calendarFullEntryProperties);
return app.IsMeeting; // Will return true, although I never added any participants.

Why is that? Did I overlook anything in the docs?


回答1:


EWS uses the same object type for meetings and appointments. The default behavior when you Save() or Update() an appointment is to send meeting invitations even if you haven't invited anyone. This essentially sets the IsMeeting to true. To save this as an appointment, change your line of code for saving to this:

app.Save(SendInvitationsMode.SendToNone);

This will keep invitations from being sent and keep IsMeeting set to false.



来源:https://stackoverflow.com/questions/23105331/appointment-save-and-appointment-update-always-set-ismeeting-to-true

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!