Hi Arnaud,
if the success flag is being set to -1, then that means True, ie it has saved successfully. Maybe you think it’s not being saved because it’s not appearing in your Contacts view? If you look at the selection formula for that view, it’s looking for a field called ‘Type’ set to ‘Person’. So try setting that field as well, and you should be ok.
btw, stay away from GetnthDocument if you’re processing a large number of documents. It has a major performance hit – the further you get into the collection, the slower it goes. Go with this kind of thing:
dim documents as NotesDocumentCollection
dim sourcedoc as NotesDocument
‘set the value of documents
set sourcedoc = documents.GetFirstDocument
do while not sourcedoc is nothing
‘do your processing here
set sourcedoc = coll.GetNextDocument(sourcedoc)
loop
hth
Tony
Discuss This Question: