由EWS管理:获取必需的和可选的约会参与者 [英] EWS-managed: Fetch required and optional attendees of appointments
问题描述
就我现在而言,我知道如何从交换服务器BUT中获取约会,但是只要我想查看必需和可选的参与者,这些字段为空...我检查了约会三项,并且有一个与会者,除了我.我是否必须对Outlook进行不同的配置,或者我错过了什么?
As far as I am now, I know how to fetch appointments from exchange server, BUT as soon as I want to see the required and optional attendees, these fields are empty ... I checked the appointment trice and there is an attendee, except me. Do I have to config Outlook differently or do I miss something?
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);
这就是我如何获取约会的方式,正如我从异常,过失和错误中发现的那样,我不需要要求与会人员交流...但是也许我缺少了一些东西.
thats how I fetch the appointments, as I figured from exceptions and trail and error, I don't need to ask exchange for attendees... but maybe I am missing something.
推荐答案
FindAppointments操作不会返回会议的出席者.而是,指定PropertySet.IdOnly的属性集以仅获取项目的ID.然后,使用ExchangeService.LoadPropertiesForItems批量加载所需的属性.
The FindAppointments operation do not return the attendees of meetings. Instead, specify a propertyset of PropertySet.IdOnly to get only the ids of the items. Then, use the ExchangeService.LoadPropertiesForItems to perform a batch load of the properties you need.
这篇关于由EWS管理:获取必需的和可选的约会参与者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!