Lisa Tucker 1.Jun.05 03:09 PM a Web browser Domino Designer 6.0.4 Windows XP
I have a database with a number of master documents. When a new acquisition is added, I would like to make a copy of these documents, but change the acquisition field to reflect the name of the new company.
Here is my code:
'sFieldName = Universal ID
Set doc = db.GetDocumentByUNID(sFieldName)
If Not (doc Is Nothing) Then
Set doc2 = New NotesDocument(db)
doc2.Form = "AddActionItem_new"
Call doc.CopyAllItems(doc2, True)
doc2.Acquisition = "LISA TEST"
Call doc2.Save( True, True )
I had to set doc2.Form or I would get a 'Cannot locate default form' error when trying to access the newly created document.
The new document is being created, and the acquisition field is being updated to reflect the new name, but the rest of the data stored in fields in the master document are not being carried over.
I want an exact duplicate - only the acquistion field should be different.
Any ideas or suggestions would be greatly appreciated - thanks in advance.