ContactFindOptions
The ContactFindOptions object contains fields that filter and sort the results of blackberry.pim.contacts.find().
Supported Platform(s)
| - BlackBerry 10 |
| API | BB5.0 | BB6.0 | BB7.0 | PB1.0 | PB2.0 | BB10 | Ripple |
|---|---|---|---|---|---|---|---|
| excludeAccounts | Y | ||||||
| favorite | Y | ||||||
| filter | Y | ||||||
| includeAccounts | Y | ||||||
| limit | Y | ||||||
| sort | Y | ||||||
| SEARCH_FIELD_GIVEN_NAME | Y | ||||||
| SEARCH_FIELD_FAMILY_NAME | Y | ||||||
| SEARCH_FIELD_ORGANIZATION_NAME | Y | ||||||
| SEARCH_FIELD_PHONE | Y | ||||||
| SEARCH_FIELD_EMAIL | Y | ||||||
| SEARCH_FIELD_BBMPIN | Y | ||||||
| SEARCH_FIELD_LINKEDIN | Y | ||||||
| SEARCH_FIELD_TWITTER | Y | ||||||
| SEARCH_FIELD_VIDEO_CHAT | Y | ||||||
| SORT_FIELD_GIVEN_NAME | Y | ||||||
| SORT_FIELD_FAMILY_NAME | Y | ||||||
| SORT_FIELD_ORGANIZATION_NAME | Y |
Configuration Document Settings
|
To use all of the API described for this object, you must ensure the following settings are in your configuration document: |
|
You must declare the feature element(s) below in your configuration document: |
| Feature ID | BB5.0 | BB6.0 | BB7.0 | PB1.0 | PB2.0 | BB10 | Ripple |
|---|---|---|---|---|---|---|---|
| <feature id="blackberry.pim.contacts" /> | Y |
| Permission Elements (PlayBook and BlackBerry 10+) |
|---|
| This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application. |
Properties
| blackberry.pim.contacts.ContactAccount[] | excludeAccounts |
| Boolean | favorite |
| Object[] | filter |
| blackberry.pim.contacts.ContactAccount[] | includeAccounts |
| Number | limit |
| Object[] | sort |
Constants
| Number | SEARCH_FIELD_GIVEN_NAME |
| Number | SEARCH_FIELD_FAMILY_NAME |
| Number | SEARCH_FIELD_ORGANIZATION_NAME |
| Number | SEARCH_FIELD_PHONE |
| Number | SEARCH_FIELD_EMAIL |
| Number | SEARCH_FIELD_BBMPIN |
| Number | SEARCH_FIELD_LINKEDIN |
| Number | SEARCH_FIELD_TWITTER |
| Number | SEARCH_FIELD_VIDEO_CHAT |
| Number | SORT_FIELD_GIVEN_NAME |
| Number | SORT_FIELD_FAMILY_NAME |
| Number | SORT_FIELD_ORGANIZATION_NAME |
Properties
blackberry.pim.contacts.ContactAccount[]
excludeAccounts
If specified, search results will be filtered to contain only contacts where the sources of the contact do not come from any of the provided accounts. If an empty array is passed, this property will be ignored. If a non-array is passed, the error callback will be triggered.
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |
Boolean
favorite
If set to true, only Contacts marked as favorite would be included in search results.
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |
Object[]
filter
An array of object literals that specifies search criteria to filter the results. The object should be in the following form:
{
fieldName: <The field being searched, one of the SORT_FIELD_* constants>,
fieldValue: <value of the field>
}
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |
blackberry.pim.contacts.ContactAccount[]
includeAccounts
If specified, search results will be filtered to contain only contacts where the sources of the contact come from any of the provided accounts. If an empty array is passed, this property will be ignored. If a non-array is passed, the error callback will be triggered.
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |
Number
limit
The maximum number of contact results returned. If limit is set to -1, all matching contacts will be returned.
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |
Object[]
sort
An array of object literals that specifies the order of the results. The object should be in the following form:
{
fieldName: <The field being searched, one of the SORT_FIELD_* constants>,
desc: true to sort results in descending order (descending if true).
}
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |
Constants
static
Number
SEARCH_FIELD_GIVEN_NAME
Used by specifying the search filter
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |
static
Number
SEARCH_FIELD_FAMILY_NAME
Used by specifying the search filter
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |
static
Number
SEARCH_FIELD_ORGANIZATION_NAME
Used by specifying the search filter
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |
static
Number
SEARCH_FIELD_PHONE
Used by specifying the search filter
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |
static
Number
SEARCH_FIELD_EMAIL
Used by specifying the search filter
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |
static
Number
SEARCH_FIELD_BBMPIN
Used by specifying the search filter
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |
static
Number
SEARCH_FIELD_LINKEDIN
Used by specifying the search filter
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |
static
Number
SEARCH_FIELD_TWITTER
Used by specifying the search filter
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |
static
Number
SEARCH_FIELD_VIDEO_CHAT
Used by specifying the search filter
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |
static
Number
SORT_FIELD_GIVEN_NAME
Used by specifying the sort field
| Supported Platforms | |
|---|---|
| - BlackBerry 10 | |