×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Aug 2004
    Location
    East Coast, USA
    Posts
    192

    adding own fields to the contacts database

    greetings all,

    i have the following problem which gives me a slight headache.

    i am populating the contacts database using
    CContactDatabase and CContactItem etc.,

    I am trying to add new fields to the database. especially some, which are not defined cntdef.h.. the problem is that they don't display in the contacts app on series60.
    On UIQ they are displayed without a problem

    Let's say i want to add a field with the label "Favorite Color" and the text content "Blue"

    the following code i try:


    field = CContactItemField::NewLC(KStorageTypeText, KUidContactFieldDefinedText);
    field->SetMapping(KUidContactFieldVCardMapUnusedN);
    field->SetLabelL(KFavoriteColorLabel);
    field->TextStorage()->SetTextL(KFavoriteColor);
    field->SetHidden(EFalse);
    contact->AddFieldL(*field);
    CleanupStack::Pop();

    <...>
    contact->IncAccessCount();
    contactsDb->AddNewContactL(*contact);
    <...>

    The field never shows up when i go to the contacts app and look at the added contact item

    instead of KUidContactFieldDefinedText, i also tried passing in my own custom uid and some other .

    is this supposed to work that way ? is there another/better way to achive this ?

    thanks for your time/help

    Blizzz

  2. #2
    Regular Contributor
    Join Date
    Aug 2004
    Location
    East Coast, USA
    Posts
    192
    alternatively i tried to use PbkEng.dll

    but nowhere i can find the PHONEBOOK_FIELD structure and there is no way construct this object without using resources ?

    hmmm

    blizzz


    from the documentation:


    Phonebook constant field type information. Loaded from resources into CPbkFieldsInfo array. The corresponding resource structure is PHONEBOOK_FIELD in PbkFieldInfo.rh.

    See also:
    CPbkFieldsInfo
    PHONEBOOK_FIELD

    FIELD

  3. #3
    Regular Contributor
    Join Date
    Mar 2006
    Location
    India
    Posts
    138

    Red face Re: adding own fields to the contacts database

    Hi Anyone can help me!!

    1. I also want to add new field type to the standard phone book application
    is there anyway so tghat we can do that...??

    Plz help .....

    2. Or in other words if I change the field label by editing them in the Phone book app, can I store them elsewhere in stead of contact database..

    Actaully I want to customize the standard PhoneBook appliacation...

    thanks....in advance!
    -Anand

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×