locked
Windows Phone calendar api: Windows live appointments vs. exchange appointments RRS feed

  • Question

  • hi,

    i am the developer of "Week View" and currently get a problem reported by a user which i cannot reproduce - maybe someone could help me.
    I am using the "Appointments class" to search for appointments in a specific date range.


    Method call is:

    _appointments.SearchCompleted += AppointsmentSearchCompleted;
    _appointments.SearchAsync(startDateInclusive, endDateInclusive, MaxAppointsments, searchState);

    When testing this by myself and searching for "birthday" i get 68 results, ranging from 28.02.2012 - 14.02.2013 (with endDate = today + 1 year).
    This is what i expect and what the app should do, all results are from a windows live calendar (i do not sync my phone with exchange) => works fine.

    This only works for windows live appointments.
    Appointments from exchange do not get reported correctly (?).

    BUT: There is some kind of "workaround" => The user has to manually step through all month.

    When selecting a specific month, i load all appointments of this month with the same function call as above.
    StartDate = First day of month
    EndDate = Last day of month

    I store the search result in a cache table.
    After stepping through 12 month, the app made 12 calls with date range from start to end of month and put the result in a cache.

    When the user executes a search operation now, he gets the expected search results for exchange calendar too.
    (because no actual api call is made, results are taken from the cache, that was filled by the previous api calls)

    So i wanted to ask:
    - Are there any differences between searching appointments in windows live and exchange?
    - I could make 12 calls and cache the result but why do this => is there a "maximum search range" for appointments?

    regards,
    hannes
    Wednesday, February 15, 2012 3:00 PM

Answers

  • Appointments from exchange do not get reported correctly (?).

    Did your customer provide any more detail about the behavior in the failure case?

    FWIW:
      I tried a simple test of Appointments SearchAsync on my own device, which syncs with Exchange 2010 but didn't notice any problem. (...other than needing to increase the maximumItems.)
      For example, I set maximumItems to 2000 then tried search for today + 1month, +6 months, and +12 months.  
      resulting number of entries were 82, 389, and 664.  
     
      To make sure it wasn't just calculating recurring appointments I created an appointment about 6 months out and searched for it in the result set.
    Wednesday, February 15, 2012 4:23 PM

All replies

  • Appointments from exchange do not get reported correctly (?).

    Did your customer provide any more detail about the behavior in the failure case?

    FWIW:
      I tried a simple test of Appointments SearchAsync on my own device, which syncs with Exchange 2010 but didn't notice any problem. (...other than needing to increase the maximumItems.)
      For example, I set maximumItems to 2000 then tried search for today + 1month, +6 months, and +12 months.  
      resulting number of entries were 82, 389, and 664.  
     
      To make sure it wasn't just calculating recurring appointments I created an appointment about 6 months out and searched for it in the result set.
    Wednesday, February 15, 2012 4:23 PM
  • Thank you for your answer!

    meanwhile we found the problem - the search request was limited with 200 results.
    While this is ok with a search range of one month it is too less with a search range of 1 year.

    Increasing the maximum number of search results should fix the problem.

    regards,
    hannes
    Wednesday, February 15, 2012 4:47 PM
  • Increasing the maximum number of search results should fix the problem.


    Increasing the date range and max items will result in an increased delay in processing and user wait time. 

    You may want to break up the search into multiple smaller date ranges, or at least one short range search + the remainder, so that you can display some data to the user right away.

    Wednesday, February 15, 2012 5:07 PM