locked
How to get ID of the FirstOccurrence of a recurring appointment ???? RRS feed

  • Question

  • I created an recurring appointment using outlook(2007 SP1).

    Then I try to get the FirstOccurrence but not work. alway return null.

    ------------------------------------------------------------------------------------------------------

    Source:

                    CalendarFolder cf = CalendarFolder.bind(service, WellKnownFolderName.Calendar);
                    FindItemsResults<Appointment> findResults = cf.findAppointments(new CalendarView(startDate, endDate));   
                    PropertySet ps = new PropertySet();
                    ps.add(AppointmentSchema.FirstOccurrence);
                    service.loadPropertiesForItems(findResults, ps);
                    for (Appointment appt : findResults.getItems())
                    {       
                        if (appt.getIsRecurring()){
                            System.out.println("getFirstOccurrence:" + appt.getFirstOccurrence());
                        }
                     }

    And this is the result:

    getFirstOccurrence:null

    -----------------------------------------------------------------------------------------------------

    How to get ID of the FirstOccurrence of a recurring appointment ????

    Monday, April 23, 2012 5:25 AM

All replies