3

就我而言,我知道如何从交换服务器获取约会,但只要我想查看必需和可选参加者,这些字段都是空的。 ..我检查了预约trice,除了我之外,还有一个与会者。我是否必须以不同的方式配置Outlook,或者我错过了什么?EWS托管:获取预约所需的和可选的与会者

  List<Appointment> listOfAppointments = new List<Appointment>(); 

     CalendarFolder cfolder = CalendarFolder.Bind(MyService, WellKnownFolderName.Calendar); 
     CalendarView cview = new CalendarView(from.ToUniversalTime(), to.ToUniversalTime()); 
     cview.PropertySet = new PropertySet(ItemSchema.Subject); 
     cview.PropertySet.Add(AppointmentSchema.Start); 
     cview.PropertySet.Add(AppointmentSchema.End); 
     cview.PropertySet.Add(AppointmentSchema.Location); 
     cview.PropertySet.Add(AppointmentSchema.ICalUid); 
     cview.PropertySet.Add(AppointmentSchema.Organizer); 
     cview.PropertySet.Add(AppointmentSchema.IsAllDayEvent); 
     cview.PropertySet.Add(AppointmentSchema.DateTimeCreated); 

     FindItemsResults<Appointment> result = cfolder.FindAppointments(cview); 

这就是我如何获取约会,因为我是从异常和试错算了,我也不需要问换取与会者...但也许我失去了一些东西。

回答

5

的FindAppointments操作不返回会议的与会者。相反,请指定PropertySet.IdOnly的属性集以仅获取项目的ID。然后,使用ExchangeService.LoadPropertiesForItems执行所需属性的批处理加载。

+0

会尝试,谢谢 – markus

+0

工作出色,不知道,你可以加载这样的属性:-) – markus

相关问题