2014-04-16 48 views
1

我要創建約會,而不是會議:Appointment.Save和Appointment.Update始終設置IsMeeting爲true

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. 

這是爲什麼?我忽略了文檔中的任何內容嗎?

回答

3

EWS在會議和約會中使用相同的對象類型。當您約會Save()Update()時,默認行爲是發送會議邀請,即使您尚未邀請任何人。這基本上將IsMeeting設置爲true。爲了保存這爲約會,改變你的代碼行保存到這一點:

app.Save(SendInvitationsMode.SendToNone); 

這將繼續邀請被髮送,並保持IsMeeting設置爲

+0

很高興知道,thx。這種行爲是否已經是文檔的一部分? – Alexander

+1

我不認爲這是詳細記錄到這個細節,所以我提出了一個請求,以確保它得到適當的覆蓋。 –

+0

有沒有辦法繞過這個限制併發送邀請呢?也許通過編程創建會議邀請? – nowhere