Hi,
I have written an application that add, edit, delete and display notes(contacts) . Adding the note will not be shown up in the contact list of lotus notes client. The same be seen in the console of my application. There is no issues with edit and delete.
Here is the way i add a note
if (sRes == NSFNoteCreate(g_dbLNHandle, &hNote))
{
if(pstructContact->pcFirstName)
{
DWORD temp = strlen(pstructContact->pcFirstName);
if(sRes != NSFItemAppend(hNote, ITEM_NAMES, "FirstName", strlen("FirstName"), TYPE_TEXT,
pstructContact->pcFirstName, temp))
bRet = false;
}
if(pstructContact->pcLastName)
{
if(sRes != NSFItemAppend(hNote, ITEM_NAMES, "LastName", strlen("LastName"), TYPE_TEXT,
pstructContact->pcLastName, strlen(pstructContact->pcLastName)))
bRet = false;
}
if(pstructContact->pcMiddleName)
{
if(sRes != NSFItemAppend(hNote, ITEM_NAMES, "MiddleInitial", strlen("MiddleInitial"), TYPE_TEXT,
pstructContact->pcMiddleName, strlen(pstructContact->pcMiddleName)))
bRet = false;
}
if (NO_ERROR != NSFNoteComputeWithForm (hNote, NULLHANDLE, (DWORD) 0, NULL, NULL))
{
F1_TL_LOGLEVEL1("CLNPIMInterface::AddItem()","Compute Note failed");
return false;
}
if(NO_ERROR != NSFNoteUpdate(hNote, UPDATE_FORCE))
{
F1_TL_LOGLEVEL1("CLNPIMInterface::AddItem()","Update Note failed");
return false;
}
}
Can any one suggest me how to over come this issue.