How to use IContact add Full name? | developer.brewmp.com How to use IContact add Full name? | developer.brewmp.com

Developer

How to use IContact add Full name?

Forums:

Hi~ All:

I' try to add name and full name for contact,
but when full name Getvalue always return error code 16,
Am I do something wrong?
nRetVal = pim_IContactsRecord_SetFieldValue(picr, "Name/1/Type", L"FIRSTNAME");
nRetVal = pim_IContactsRecord_SetFieldValue(picr, "Name/1/Value", firstName);
nRetVal = pim_IContactsRecord_SetFieldValue(picr, "Name/2/Type",L"LASTNAME");
nRetVal = pim_IContactsRecord_SetFieldValue(picr, "Name/2/Value", lastname);

nRetVal = pim_IContactsRecord_SetFieldValue(picr, "Name/3/Type",L"FULLNAME");
nRetVal = pim_IContactsRecord_SetFieldValue(picr, "Name/3/Value", name);

nResult = pim_IContactsRecord_GetFieldValue(m_pIRecord, "Name/3/Value", L"FULLNAME", 0, &fieldDataLength); <== this will return errorcode 16

Hi,
You need to first add that record in contact then the list will be updated.Also concatinate first name and last name to get the full name.try this i think this will do
Regards
Priya

Hi,
You need to first add that record in contact then the list will be updated.Also concatinate first name and last name to get the full name.try this i think this will do
Regards
Priya

priya.prakash wrote:Hi,
You need to first add that record in contact then the list will be updated.Also concatinate first name and last name to get the full name.try this i think this will do
Regards
Priya
Hi~
I still got error code 16 for pim_IContactsRecord_GetFieldValue(m_pIRecord, "Name/3/Value", L"FULLNAME", 0, &fieldDataLength);
after call
pim_IContacts_AddRecord, the add record result is = 0;
still don't know why....

priya.prakash wrote:Hi,
You need to first add that record in contact then the list will be updated.Also concatinate first name and last name to get the full name.try this i think this will do
Regards
Priya
Hi~
I still got error code 16 for pim_IContactsRecord_GetFieldValue(m_pIRecord, "Name/3/Value", L"FULLNAME", 0, &fieldDataLength);
after call
pim_IContacts_AddRecord, the add record result is = 0;
still don't know why....