ContactOrganization
The ContactOrganization object contains the organization information of a Contact object.
Code Example:
function createContact() {
var contacts = blackberry.pim.contacts;
var workOrg = {
"name": "Research in Motion",
"department": "BlackBerry WebWorks",
"title": "Developer"
};
var newContact = contacts.create();
newContact.name = {
"givenName": "Homer",
"familyName": "Simpson"
};
newContact.organizations = [workOrg];
newContact.save(onSaveSuccess, onSaveError);
alert("Work organization: " + workOrg.name);
}
function onSaveSuccess(contact) {
alert("Contact saved: " + contact.organizations[0].name);
}
function onSaveError(error) {
alert("Contact save failed: " + error.code);
}
|
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
String
department
The contact's department within the organization.
Supported Platforms
|
|
- BlackBerry 10
|
String
name
The name of the organization.
Supported Platforms
|
|
- BlackBerry 10
|
String
title
The contact's title within the organization.
Supported Platforms
|
|
- BlackBerry 10
|
Documentation generated by
JsDoc Toolkit 2.4.0 on Sun Dec 30 2012 18:15:36 GMT-0500 (EST)