本文介绍了约会.保存和约会.更新始终将IsMeeting设置为true的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建约会,而不是会议:

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?

推荐答案

EWS使用相同的对象类型进行会议和约会. Save()Update()约会时的默认行为是发送会议邀请,即使您没有邀请任何人.这实际上将 IsMeeting 设置为 true .要将其保存为约会,请将您要保存的代码行更改为此:

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);

这将阻止发送邀请,并将 IsMeeting 设置为 false .

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

这篇关于约会.保存和约会.更新始终将IsMeeting设置为true的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 10:34