none
Updating and Sending Invitions from a Public Calendar RRS feed

  • Question

  • We are running on Exchange 2010 SP2 Update Rollup6 and are trying to write a piece of code that can add an appointment to a public calendar and send an invitation to the meeting recipients. We would also like to write code that lets you perform updates to the item and send out the updates. We created a mailbox enabled user that has permissions to a test public calendar we created.

    Here is a snippet of the code.

    // Binding

    var service = GetBinding();

    // Calendar Item Details

    var appointment = new Appointment(service);

    //SetTimeZone(appointment);

    // Subject

    //appointment.Subject = EmailFormater.Subject.GetEventSubjectForExchange(eventItem);

    appointment.Subject = eventItem.ToSubject();

    // Location

    appointment.Location = EmailFormater.GetEventLocation(eventItem);

    // Category - Assigns Color to the appointment

    appointment.Categories.Add(eventItem.MeetingCategoryDesc);

    // Event Time

    appointment.Start = eventItem.StartDate;

    appointment.End = eventItem.EndDate;

    // TODO: need to incorporate

    // appointment.IsAllDayEvent

    // Calendar Item Body

    appointment.Body = EmailFormater.GetEventBody(eventItem);

    appointment.Body.BodyType = Microsoft.Exchange.WebServices.Data.BodyType.Text;

    // Get Public Folder Id

    var folderId = GetCalendarFolderId(service, publicFolder, true);

    // Get Event Attenddes

    AppendAttendeesRequired(eventItem, appointment);

    AppendAttendeesOptional(appointment);

     

    appointment.Save(folderId, SendInvitationsMode.SendToNone);

    //below fails.

    //appointment.Save(folderId, SendInvitationsMode.SendToAllAndSaveCopy);

    The SendToNone works fine but the SendToAllandSaveCopy does not work. We are using version 1.2 of the EWS Managed API.

    I did see a post about this being a limitation back in 2010 but was wondering if it still is and why it would be if possible.

    Thanks

    Thursday, May 23, 2013 4:40 PM

Answers

  • Meeting Invites/Updates won't work with Public folder calendars (even if they are mail enabled), they also only work properly if you don't use the Main Calendar folder of a Mailbox that is the organizer of the meeting and  FreeBusy time won't also work in both of these scenarios.Basically Public folders weren't designed to do calendaring. In your code your just saving the appointment to a public folder.

    If your using Exchange 2010 you would be better of using a Shared Mailbox or use a Resource/Meeting Room mailbox if you want to automate calendar responses.

    Cheers
    Glen

    • Marked as answer by adnorton Friday, May 24, 2013 11:15 AM
    Friday, May 24, 2013 4:47 AM

All replies

  • Meeting Invites/Updates won't work with Public folder calendars (even if they are mail enabled), they also only work properly if you don't use the Main Calendar folder of a Mailbox that is the organizer of the meeting and  FreeBusy time won't also work in both of these scenarios.Basically Public folders weren't designed to do calendaring. In your code your just saving the appointment to a public folder.

    If your using Exchange 2010 you would be better of using a Shared Mailbox or use a Resource/Meeting Room mailbox if you want to automate calendar responses.

    Cheers
    Glen

    • Marked as answer by adnorton Friday, May 24, 2013 11:15 AM
    Friday, May 24, 2013 4:47 AM
  • Thanks Glen much appreciated.
    Friday, May 24, 2013 11:15 AM