ContactName

The ContactName object contains name properties of a blackberry.pim.contacts.Contact object.


Code Example:
function createContact() {
    var contacts = blackberry.pim.contacts;

    var name = {
        "givenName": "John",
        "familyName": "Smith"
    };

    var newContact = contacts.create();
    newContact.name = name;

    newContact.save(onSaveSuccess, onSaveError);

    alert("Contact first name: " + newContact.name.givenName);
}

function onSaveSuccess(contact) {
    alert("Contact saved: " + contact.name.givenName);
}

function onSaveError(error) {
    alert("Contact save failed: " + error.code);
}


Supported Platform(s)

- BlackBerry 10
View Supported Platform Table
APIBB5.0BB6.0BB7.0PB1.0PB2.0BB10Ripple
alias           Y 
familyName           Y 
formatted           Y 
givenName           Y 
honorificPrefix           Y 
honorificSuffix           Y 
middleName           Y 
phoneticFamilyName           Y 
phoneticGivenName           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 IDBB5.0BB6.0BB7.0PB1.0PB2.0BB10Ripple
<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

String alias
String familyName
String formatted
String givenName
String honorificPrefix
String honorificSuffix
String middleName
String phoneticFamilyName
String phoneticGivenName

Properties

String alias


The contact's alias.


Supported Platforms
 - BlackBerry 10

String familyName


The contact's family name.


Supported Platforms
 - BlackBerry 10

String formatted


The complete name of the contact.


Supported Platforms
 - BlackBerry 10

String givenName


The contact's given name.


Supported Platforms
 - BlackBerry 10

String honorificPrefix


The contacts prefix (example Mr. or Dr.)


Supported Platforms
 - BlackBerry 10

String honorificSuffix


The contacts suffix (example Esq.).


Supported Platforms
 - BlackBerry 10

String middleName


The contact's middle name.


Supported Platforms
 - BlackBerry 10

String phoneticFamilyName


The contact's phonetic family name.


Supported Platforms
 - BlackBerry 10

String phoneticGivenName


The contact's phonetic given name.


Supported Platforms
 - BlackBerry 10

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Feb 11 2013 14:51:05 GMT-0500 (EST)