Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get "Show as" for an appointment in EWS

Ive been looking at adding some basic Exchange functionality to our intranet, and so far it all seems fairly easy to do. However, Ive run into a small issue I dont know how to solve.

I am displaying our users calendars on their profile page but I also need to show the "Show as" attribute for each appointment entry. This is where Im coming up short. Looking at the Appointment properties there is nothing that seems to do the trick. (http://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.appointment_properties%28v=exchg.80%29.aspx)

Can any of you guys point me in the right direction?

like image 876
Kasper Wittrup Avatar asked May 30 '14 09:05

Kasper Wittrup


1 Answers

What you looking for is the LegacyFreeBusyStatus http://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.legacyfreebusystatus(v=exchg.80).aspx which in the way EWS represents the ShowAs setting on an appointment. eg

        CalendarView cv = new CalendarView(DateTime.Now,DateTime.Now.AddDays(200),100);
        FindItemsResults<Appointment>findresults = service.FindAppointments(WellKnownFolderName.Calendar, cv);

        foreach (Appointment aptval in findresults.Items)
        {
            Console.WriteLine(aptval.LegacyFreeBusyStatus);        
        }

Cheers Glen

like image 145
Glen Scales Avatar answered Nov 11 '22 13:11

Glen Scales