EWS 일정에서 약속 참석자에 액세스하고 있습니다. 나는 시도 :Microsoft.Exchange.WebServices.Data.ServiceValidationException : FindItem 요청에서 RequiredAttendees 속성을 사용할 수 없습니다.
cView.PropertySet = new PropertySet(AppointmentSchema.Subject, AppointmentSchema.Start, AppointmentSchema.End);
하지만 내 appointments
목록 항목 각각 시험 약속은 여러 사용자에 의해 허용했다하더라도, 널 (null) 필수/선택 참석자 필드를 반환했습니다. 내 가정은 PropertySet 지금처럼 더 ApplicationSchema
속성을 포함 할 필요가 있다는 것입니다 :
Microsoft.Exchange.WebServices :
cView.PropertySet = new PropertySet(AppointmentSchema.Subject, AppointmentSchema.Start, AppointmentSchema.End, AppointmentSchema.RequiredAttendees, AppointmentSchema.OptionalAttendees);
그러나이 calendar.FindAppointments에서 다음 ServiceValidationException 오류 (를 CView)를 던졌습니다. Data.ServiceValidationException : RequiredAttendees 속성은 FindItem 요청에서 사용할 수 없습니다.
appointments
에 필수/선택 참석자가 포함되도록 수정하려면 어떻게해야합니까?
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
service.Credentials = new WebCredentials(emailAddress, emailPassword);
// Initialize values for the start and end times, and the number of appointments to retrieve.
DateTime startDate = DateTime.Now;
DateTime endDate = startDate.AddYears(1);
const int NUM_APPTS = 4;
// Initialize the calendar folder object with only the folder ID.
CalendarFolder calendar = CalendarFolder.Bind(service, WellKnownFolderName.Calendar, new PropertySet());
// Set the start and end time and number of appointments to retrieve.
CalendarView cView = new CalendarView(startDate, endDate, NUM_APPTS);
// Limit the properties returned to the appointment's subject, start time, and end time.
cView.PropertySet = new PropertySet(AppointmentSchema.Subject,
AppointmentSchema.Start,
AppointmentSchema.End,
AppointmentSchema.RequiredAttendees,
AppointmentSchema.OptionalAttendees);
// Retrieve a collection of appointments by using the calendar view.
FindItemsResults<Appointment> appointments = calendar.FindAppointments(cView);