ContactsView
Last modified: October 13, 2012
Applies to: Exchange Online | Exchange Server 2007 | Exchange Server 2010 | Exchange Server 2013 | Office 365
The ContactsView element defines a search for contact items based on alphabetical display names.
ContactsView
<ContactsView MaxEntriesReturned="" InitialName="" FinalName="" />
ContactsViewType
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 |
|---|---|
Defines a request to find items in a mailbox. The following is the XPath expression to this element: /FindItem |
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="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Body>
<FindItem Traversal="Shallow" xmlns="http://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>