ContactsView

Last modified: March 16, 2009

Applies to: Exchange Server 2007 | Exchange Server 2010

The ContactsView element defines a search for contact items based on alphabetical display names.

FindItem
  ContactsView

<ContactsView MaxEntriesReturned="" InitialName="" FinalName="" />

ContactsViewType

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

MaxEntriesReturned

Describes the maximum number of results to return in the FindItem response.

InitialName

Defines the first name in the contacts list to return in the response. If the specified initial name is not in the contacts list, the next alphabetical name as defined by the cultural context will be returned, except if the next name comes after FinalName. If the InitialName attribute is omitted, the response will contain a list of contacts that starts with the first name in the contact list. This attribute is optional.

FinalName

Defines the last name in the contacts list to return in the response. If the FinalName attribute is omitted, the response will contain all subsequent contacts in the specified sort order. If the specified final name is not in the contacts list, the next alphabetical name as defined by the cultural context will be excluded.

For example, if FinalName="Name", but Name is not in the contacts list, contacts that have display names of Name1 or NAME will not be included.

This attribute is optional.

Child Elements

None.

Parent Elements

Element

Description

FindItem

Defines a request to find items in a mailbox.

The following is the XPath expression to this element:

/FindItem

Remarks

The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange Server 2007 that has the Client Access server role installed.

Example

The following example of a request demonstrates how to find the first three contacts starting with the contact that has the display name of Kelly Rollin.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/"
               xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">
  <soap:Body>
    <FindItem Traversal="Shallow" xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
      <ItemShape>
        <t:BaseShape>IdOnly</t:BaseShape>
        <t:AdditionalProperties>
          <t:FieldURI FieldURI="contacts:DisplayName"/>
        </t:AdditionalProperties>
      </ItemShape>
      <ContactsView MaxEntriesReturned="3" InitialName="Kelly Rollin" />
      <SortOrder>
        <t:FieldOrder Order="Descending">
          <t:FieldURI FieldURI="contacts:DisplayName"/>
        </t:FieldOrder>
        </SortOrder>
      <ParentFolderIds>
        <t:DistinguishedFolderId Id="contacts"/>
      </ParentFolderIds>
    </FindItem>
  </soap:Body>
</soap:Envelope>

Element Information

Namespace

https://schemas.microsoft.com/exchange/services/2006/messages

Schema Name

Messages schema

Validation File

Messages.xsd

Can be Empty

False

See Also

Reference

Other Resources