Hello, I am trying to synchronize Navision contacts with outlook contacts. I have a problem.
I need to know how to check if the GET (in the code below Getfirst) really gets an entry. The example below works till the contacts folder is empty, but I don´t know how to find out that the automation variable is not initialized.
CREATE(olApp);
objNS := olApp.GetNamespace('MAPI');
olFolders := objNS.Folders;
bcmRootFolder := olFolders.Item('Business Contact Manager');
bcmContactsFldr := bcmRootFolder.Folders.Item('Business Contacts');
existContact := bcmContactsFldr.Items.GetFirst;
MESSAGE(existContact.FileAs);
If existContact.typename = 'nothing'
string := existContact.FileAs;
WHILE NOT (string = '') DO BEGIN
existContact.Delete;
existContact := bcmContactsFldr.Items.GetFirst;
string := existContact.FileAs;
END;
In Visual basic there exist the TypeName command.... This is what I need.
SOLUTION: In Nav you have the ISCLEAR command.... (It´s my first time playing with automation in Nav)
0
Answers
regards