ContactName

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

Installation:

To use this API in your project, add the contacts plugin:

webworks plugin add com.blackberry.pim.contacts

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);
      }
      
Properties:
String alias
String familyName
String givenName
String honorificPrefix
String honorificSuffix
String middleName
String phoneticFamilyName
String phoneticGivenName

alias

The contact's alias.

Synopsis:

String ContactName.alias

familyName

The contact's family name.

Synopsis:

String ContactName.familyName

givenName

The contact's given name.

Synopsis:

String ContactName.givenName

honorificPrefix

The contacts prefix (example Mr. or Dr.).

Synopsis:

String ContactName.honorificPrefix

honorificSuffix

The contacts suffix (example Esq.).

Synopsis:

String ContactName.honorificSuffix

middleName

The contact's middle name.

Synopsis:

String ContactName.middleName

phoneticFamilyName

The contact's phonetic family name.

Synopsis:

String ContactName.phoneticFamilyName

phoneticGivenName

The contact's phonetic given name.

Synopsis:

String ContactName.phoneticGivenName

Last modified: 2014-10-09



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus