ContactFindOptions
The ContactFindOptions object contains fields that filter and sort the results of blackberry_pim_contacts_find().
Installation:
To use this API in your project, add the contacts plugin:
webworks plugin add com.blackberry.pim.contacts
Properties: | |
---|---|
blackberry_pim_contacts_ContactAccount[] | excludeAccounts |
Boolean | favorite |
Object[] | filter |
blackberry_pim_contacts_ContactAccount[] | includeAccounts |
Number | limit |
Object[] | sort |
Constants: | |
---|---|
Number | SEARCH_FIELD_BBMPIN |
Number | SEARCH_FIELD_EMAIL |
Number | SEARCH_FIELD_FAMILY_NAME |
Number | SEARCH_FIELD_GIVEN_NAME |
Number | SEARCH_FIELD_LINKEDIN |
Number | SEARCH_FIELD_ORGANIZATION_NAME |
Number | SEARCH_FIELD_PHONE |
Number | SEARCH_FIELD_TWITTER |
Number | SEARCH_FIELD_VIDEO_CHAT |
Number | SORT_FIELD_FAMILY_NAME |
Number | SORT_FIELD_GIVEN_NAME |
Number | SORT_FIELD_ORGANIZATION_NAME |
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.
Synopsis:
blackberry.pim.contacts.ContactAccount[] ContactFindOptions.excludeAccounts
favorite
If set to true, only Contacts marked as favorite would be included in search results.
Synopsis:
Boolean ContactFindOptions.favorite
filter
An array of object literals that specifies search criteria to filter the results.
{ fieldName: <The field being searched, one of the SORT_FIELD_* constants>, fieldValue: <value of the field> }
Synopsis:
Object[] ContactFindOptions.filter
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.
Synopsis:
ContactAccount[] ContactFindOptions.includeAccounts
limit
The maximum number of contact results returned. If limit is set to -1, all matching contacts will be returned.
Synopsis:
Number ContactFindOptions.limit
sort
An array of object literals that specifies the order of the results.
{ fieldName: <The field being searched, one of the SORT_FIELD_* constants>, desc: true to sort results in descending order (descending if true). }
Synopsis:
Object[] ContactFindOptions.sort
SEARCH_FIELD_BBMPIN
Used by specifying the search filter
Synopsis:
constant
Number ContactFindOptions.SEARCH_FIELD_BBMPIN = 5
SEARCH_FIELD_EMAIL
Used by specifying the search filter
Synopsis:
constant
Number ContactFindOptions.SEARCH_FIELD_EMAIL = 4
SEARCH_FIELD_FAMILY_NAME
Used by specifying the search filter
Synopsis:
constant
Number ContactFindOptions.SEARCH_FIELD_FAMILY_NAME = 1
SEARCH_FIELD_GIVEN_NAME
Used by specifying the search filter
Synopsis:
constant
Number ContactFindOptions.SEARCH_FIELD_GIVEN_NAME = 0
SEARCH_FIELD_LINKEDIN
Used by specifying the search filter
Synopsis:
constant
Number ContactFindOptions.SEARCH_FIELD_LINKEDIN = 6
SEARCH_FIELD_ORGANIZATION_NAME
Used by specifying the search filter
Synopsis:
constant
Number ContactFindOptions.SEARCH_FIELD_ORGANIZATION_NAME = 2
SEARCH_FIELD_PHONE
Used by specifying the search filter
Synopsis:
constant
Number ContactFindOptions.SEARCH_FIELD_PHONE = 3
SEARCH_FIELD_TWITTER
Used by specifying the search filter
Synopsis:
constant
Number ContactFindOptions.SEARCH_FIELD_TWITTER = 7
SEARCH_FIELD_VIDEO_CHAT
Used by specifying the search filter
Synopsis:
constant
Number ContactFindOptions.SEARCH_FIELD_VIDEO_CHAT = 8
SORT_FIELD_FAMILY_NAME
Used by specifying the sort field
Synopsis:
constant
Number ContactFindOptions.SORT_FIELD_FAMILY_NAME = 1
SORT_FIELD_GIVEN_NAME
Used by specifying the sort field
Synopsis:
constant
Number ContactFindOptions.SORT_FIELD_GIVEN_NAME = 0
SORT_FIELD_ORGANIZATION_NAME
Used by specifying the sort field
Synopsis:
constant
Number ContactFindOptions.SORT_FIELD_ORGANIZATION_NAME = 2
Last modified: 2014-10-09
Got questions about leaving a comment? Get answers from our Disqus FAQ.
comments powered by Disqus