简体   繁体   中英

EWS - Share extended properties with invited attendees

Is it possible to share extended properties with invited attendees of an Exchange appointment? In other words, is it possible to create a meeting in Exchange using EWS which would pass it's extended properties (custom fields) to attendee's copies of the meeting (assuming they use Exchange as well)?

So far non of the options I tried worked - I can only see the properties in the organizer's meeting through both EWS and Outlook.

A peace of working example or explanation of solution would be great.

UPDATE. Based on this thread here's what I tried (and it didn't work):

var exchangeAppointment = new Appointment(exchange);

...

ExtendedPropertyDefinition extendedPropertyDefinition = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, "keyword", MapiPropertyType.String);
exchangeAppointment.SetExtendedProperty(extendedPropertyDefinition, "value");

var sendModeForSave = SendInvitationsMode.SendToAllAndSaveCopy;
await exchangeAppointment.Save(sendModeForSave);

foreach (var email in command.MeetingAttendeeEmails) {
    exchangeAppointment.RequiredAttendees.Add(email);
}

var sendModeForUpdate = SendInvitationsOrCancellationsMode.SendToAllAndSaveCopy;
await exchangeAppointment.Update(ConflictResolutionMode.AlwaysOverwrite, sendModeForUpdate);

You could create appointment with custom properties in EWS, then view custom extended properties by using the EWS Managed API 2.0

You could refer to this code:

   PropertySet YourProperyset = new PropertySet(BasePropertySet.FirstClassProperties);
    var extendendProperty = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Address, "organizer",MapiPropertyType.String);
    YourProperyset.Add(extendendProperty);
    var folderId = new FolderId(WellKnownFolderName.Calendar, new Mailbox(userName));
    var calendar = CalendarFolder.Bind(service, folderId);
    var calendarView = new CalendarView(start, stop);
    calendarView.PropertySet = YourProperyset;
    return calendar.FindAppointments(calendarView).ToList();

For more information, you could refer to these link:

Create appointment with custom properties in EWS

Viewing custom extended properties by using the EWS Managed API 2.0

Set CustomProperties on appointment for all attendees

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM