【问题标题】:EWS-managed: Fetch required and optional attendees of appointmentsEWS 管理:获取约会的必需和可选参与者
【发布时间】:2011-11-20 08:25:49
【问题描述】:

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

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

这就是我获取约会的方式,正如我从异常和跟踪和错误中得出的那样,我不需要要求交换与会者......但也许我错过了一些东西。

【问题讨论】:

    标签: exchange-server exchangewebservices exchange-server-2007 ews-managed-api


    【解决方案1】:

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

    【讨论】:

    • 工作得很好,不知道你可以加载这样的属性:-)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-19
    • 1970-01-01
    • 2012-06-17
    • 1970-01-01
    • 2017-06-14
    • 1970-01-01
    相关资源
    最近更新 更多