/ Forums / Advansys Formativ / Creating Solutions with Formativ / Address book lookup failed after GroupWise upgrade (7.0 to 2012)

  • Creator
    Topic
  • #5166
    Cheryl
    Participant

    Hello,

    We recently upgraded to GroupWise 2012 and one address book lookup function in a formative form we have been using for years suddenly didn’t work any more.

    The lookup looks like this:

    Set objAddressBook = Groupwise.Account.Addressbooks.Item(“Novell GroupWise Address Book”)
    If objAddressBook Is Nothing Then Exit Function
    Set objEntries = objAddressBook.AddressBookEntries.Find(“(<E-Mail Address> MATCHES “”” & strSearchItem & “””)”)

    strSearchItem is passed as email username, for example “clu”, so the return entry would be my email address and it had been working before.

    I noticed someone had asked exactly the same question before, but there was no clue whether / how he/she fixed the issue. Anyway, here is the link to the previous topic:

    AddressBookEntries.Find

    So I tried the code provided in the link by the Advansys support, and it didn’t work either. I tried both MATHES and CONTAINS. Neither works. Do I need some new dll?

    Thanks,
    Cheryl

  • Author
    Replies
  • #9925
    Support 3
    Participant

    Thanks for your post.

    This behaviour most likely related to GroupWise 2012 Object API (OAPI).

    http://www.novell.com/document…i/data/h3r0rhi6.html

    quote:
    Addresses Find(String Condition)

    Returns a new Addresses collection containing the addresses from this collection that match the filter expression given by the Condition parameter (see Section 5.0, Filter Expressions). This Find method differs from the Find methods for messages in that it accepts a restricted syntax and does not accept a saved Filter. Each address book may support a different set of filtering operations. Filtering on an address book that supports a limited set of operations will throw an exception when handed a filter expression beyond the address book’s capabilities. This method does not support BEGINSWITH, but it does support MATCHES and CONTAINS.

    You can search only on First Name and Last Name in the System Address Book. If you try searching on Name, this method fails.

    According to OAPI, “E-Mail Address” field not supported in System Address book, only support “First Name” & “Last Name”. However, “E-Mail Address” field still works in GroupWise 8 client but in limited situation. For example:

    Works: Set objEntries = objAddressBook.AddressBookEntries.Find(“(<E-Mail Address> MATCHES “”Test@xyz.com””)”)
    Does not work: Set objEntries = objAddressBook.AddressBookEntries.Find(“(<E-Mail Address> MATCHES “”Bill.Smith@xyz.com””)”)

    Looks like email address where “.” exists in name does not work. We will recommend not to use the “E-Mail Address”, instead use First Name or Last Name. Example:

    Set objEntries = objAddressBook.AddressBookEntries.Find(“(<First Name> CONTAINS “”” & strSearchItem & “””)”)

    Other option could be cache the System Address book entries (xml file), where each entry can store the name, email address and other details then use the cache xml file to search entry. You will need to update the cache file to take into account for the new Address Book entry or modified existing entry.

    Best regards,

    Advansys Support

    #9923
    Cheryl
    Participant

    Thanks for the help! I am now getting the entry using last name search!

    Best regards!

    Cheryl

    #9924
    Support 3
    Participant

    Great, thanks for letting us know and glad it was of assistance.

    Regards,
    Advansys Support

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.