ContactData object

The ContactData object represents the information for a single contact in the contacts database. Each property of the object corresponds to a specific piece of information, a field, such as first name, last name, home phone number, or email address. If a contact does not use a particular field, the property for that field is not returned for the contact when retrieving information from the database.

**Note:**If you try to store a string value that exceeds the maximum length for the platform, the string is truncated accordingly.

Object literal notation

ContactData
{
    name : {
        last : String,  // last name
        first : String,  // first name
        middle : String,  // middle name
        prefix : String,  // name prefix
        suffix : String  // name suffix
    },
    tel : {
        land : [],  // landline numbers, Array of Strings
        mobile : [],  // mobile numbers, Array of Strings
        video : [],  // video numbers, Array of Strings
        fax : [],  // fax numbers, Array of Strings
        voip : [],  // VoIP numbers, Array of Strings
        home : {
            land : [],  // landline numbers, Array of Strings
            mobile : [],  // mobile numbers, Array of Strings
            video : [],  // video numbers, Array of Strings
            fax : [],  // fax numbers, Array of Strings
            voip : []  // VoIP numbers, Array of Strings
        },
        work : {
            land : [],  // landline numbers, Array of Strings
            mobile : [],  // mobile numbers, Array of Strings
            video : [],  // video numbers, Array of Strings
            fax : [],  // fax numbers, Array of Strings
            voip : []  // VoIP numbers, Array of Strings
        }
    },
    address : {
        street : String,  // street address
        local : String,  // locality (e.g., city)
        region : String,  // region (e.g., state)
        code : String,  // postal code
        country : String,  // country
        email : [],  // email addresses, Array of Strings
        uri : String,  // web address
        home : {
            street : String,  // street address
            local : String,  // locality (e.g., city)
            region : String,  // region (e.g., state)
            code : String,  // postal code
            country : String,  // country
            email : [],  // email addresses, Array of Strings
            uri : String  // web address'
        },
        work : {
            street : String,  // street address
            local : String,  // locality (e.g., city)
            region : String,  // region (e.g., state)
            code : String,  // postal code
            country : String,  // country
            email : [],  // email addresses, Array of Strings
            uri : String  // web address
        }
    },
    company : {
        name : String,  // company name
        title : String  // job title
    },
    id : String,  // Applications should treat the ID object as opaque data.
    notes : String,
    anniversary : Date,
    birthday : Date,
    nickname : String,
    photo : String,
    displayName : String,
    xspid : [],  // Array of Strings
    position : String,
    positionCoordinatesLatitude : String,
    positionCoordinatesLongitude : String,
    positionCoordinatesAltitude : String,
    positionCoordinatesAccuracy : String,
    positionCoordinatesAltitudeAccuracy : String,
    positionCoordinatesHeading : String,
    positionCoordinatesSpeed : String,
    positionTimestamp : String
}

Object properties

The following table describes the properties of the ContactData object. Properties enclosed in brackets are optional.

**Table:**ContactData object properties

|

Property |

Description |

Type |

Maximum length
[name]

Specifies the contact's name. |

object | | | [name.last] |

Specifies the last name. |

string |

50 (14 for SIM database) | | [name.first] |

Specifies the first name. |

string |

50 | | [name.middle] |

Specifies the middle name. |

string |

50 | | [name.prefix] |

Specifies the name prefix. |

string |

10 | | [name.suffix] |

Specifies the name suffix. |

string |

10 | | [tel] |

Specifies the contact's general, home, and work phone numbers. |

object | | | [tel.land] |

Specifies the general landline phone numbers. |

array of strings |

48 | | [tel.mobile] |

Specifies the general mobile phone numbers. |

array of strings |

48 | | [tel.video] |

Specifies the general video numbers. |

array of strings |

48 | | [tel.fax] |

Specifies the general fax numbers. |

array of strings |

48 | | [tel.voip] |

Specifies the general VoIP numbers. |

array of strings |

100 | | [tel.home] |

Specifies the contact's home phone numbers. |

object | | | [tel.home.land] |

Specifies the home landline phone numbers. |

array of strings |

48 | | [tel.home.mobile] |

Specifies the home mobile phone numbers. |

array of strings |

48 | | [tel.home.video] |

Specifies the home video numbers. |

array of strings |

48 | | [tel.home.fax] |

Specifies the home fax numbers. |

array of strings |

48 | | [tel.home.voip] |

Specifies the home VoIP numbers. |

array of strings |

100 | | [tel.work] |

Specifies the contact's work phone numbers. |

object | | | [tel.work.land] |

Specifies the work landline phone numbers. |

array of strings |

48 | | [tel.work.mobile] |

Specifies the work mobile phone numbers. |

array of strings |

48 | | [tel.work.video] |

Specifies the work video numbers. |

array of strings |

48 | | [tel.work.fax] |

Specifies the work fax numbers. |

array of strings |

48 | | [tel.work.voip] |

Specifies the work VoIP numbers. |

array of strings |

100 | | [address] |

Specifies the contact's general, home, and work addresses. |

object | | | [address.street] |

Specifies the general street address. |

string |

50 | | [address.local] |

Specifies the general location address, such as a city. |

string |

50 | | [address.region] |

Specifies the general region address, such as a state. |

string |

50 | | [address.code] |

Specifies the general zip code. |

string |

20 | | [address.country] |

Specifies the general country address. |

string |

50 | | [address.email] |

Specifies the general email addresses. |

array of strings |

150 | | [address.uri] |

Specifies the general Web address. |

string |

1000 | | [address.home] |

Specifies the contact's home address. |

object | | | [address.home.street] |

Specifies the home street address. |

string |

50 | | [address.home.local] |

Specifies the home location address, such as a city. |

string |

50 | | [address.home.region] |

Specifies the home region address, such as a state. |

string |

50 | | [address.home.code] |

Specifies the home zip code. |

string |

20 | | [address.home.country] |

Specifies the home country address. |

string |

50 | | [address.home.email] |

Specifies the home email addresses. |

array of strings |

150 | | [address.home.uri] |

Specifies the home Web address. |

string |

1000 | | [address.work] |

Specifies the contact's work address. |

object | | | [address.work.street] |

Specifies the work street address. |

string |

50 | | [address.work.local] |

Specifies the work location address, such as a city. |

string |

50 | | [address.work.region] |

Specifies the work region address, such as a state. |

string |

50 | | [address.work.code] |

Specifies the work zip code. |

string |

20 | | [address.work.country] |

Specifies the work country address. |

string |

50 | | [address.work.email] |

Specifies the work email addresses. |

array of strings |

150 | | [address.work.uri] |

Specifies the work Web address. |

string |

1000 | | [company] |

Specifies information about the contact's employment. |

object | | | [company.name] |

Specifies the name of the company in which the contact works. |

string |

50 | | [company.title] |

Specifies the contact's job title in the company. |

string |

50 | | id |

Specifies the unique ID of the contact. This ID identifies the contact in the database.

This property is ignored in the addContactmethod. In all other methods, this property is mandatory. |

string |

Applications must treat the idobject as opaque data. | | [notes] |

Contains notes about the contact. |

string |

1000 | | [anniversary] |

Specifies the anniversary date. |

date |

The date is in TTime format. | | [birthday] |

Specifies the contact's birthday. |

date |

The date is in TTime format. | | [nickname] |

Specifies the contact's nick name. |

string |

50 | | [photo] |

Specifies the full path and file name of the image of the contact. |

string |

256 | | [displayName] |

Contains either the first name or the last name depending on user settings.

**Note:**This property is not supported on S60 devices. |

string | | | [xspid] |

Specifies the xspids of the contact. This property is used to store IM addresses such as Yahoo ID and MSN ID.

**Note:**This property may not be supported on some S60 devices. |

array of strings |

150 | | [position] |

Specifies the position field of Geo Location.

**Note:**This property is not supported on S60 devices. |

string | | | [positionCoordinatesLatitude] |

Specifies the latitude coordinates.

**Note:**This property is not supported on S60 devices. |

string | | | [positionCoordinatesLongitude] |

Specifies the longitude coordinates.

**Note:**This property is not supported on S60 devices. |

string | | | [positionCoordinatesAltitude] |

Specifies the altitude of the position in meters.

**Note:**This property is not supported on S60 devices. |

string | | | [positionCoordinatesAccuracy] |

Specifies the accuracy of latitude and longitude coordinates.

**Note:**This property is not supported on S60 devices. |

string | | | [positionCoordinatesAltitudeAccuracy] |

Specifies the accuracy of the altitude value.

**Note:**This property is not supported on S60 devices. |

string | | | [positionCoordinatesHeading] |

Specifies the hosting device's direction of movement in degrees counting clockwise relative to true north.

**Note:**This property is not supported on S60 devices. |

string | | | [positionCoordinatesSpeed] |

Specifies the hosting device's current ground speed in meters per second (mps).

**Note:**This property is not supported on S60 devices. |

string | | | [positionTimestamp] |

Species when the position coordinates were recorded.

**Note:**This property is not supported on S60 devices. |

string | |