Create document A in web, using File Upload to attach file(s), then press a ‘New Order’ button to create another document B(which is Resoponse, inherit vlaues from A), in WebQueryOpen of document B, agent to copy $FILE of A to B, after document B open, I can see the attachment at the bottom of B, but after press ‘Save’ button in B, the attachment is gone.there is not Rich Text field in A and B, but in A, $FILE contains attachments.
‘new Order’ button in A:
@Command([FileSave]);
@Command([FileCloseWindow]);
@Command([Compose] ; “Document B”)
‘Save’ button in B:
@Command([FileSave]);
@Command([ViewRefreshFields])
code in WebQueryOpen in B:
Sub CopyAttachments (cdb As NotesDatabase, docA As NotesDocument, docBAs NotesDocument)
Dim docTemp As NotesDocument
Call docB.RemoveItem (“$FILE”)
Set docTemp = cdb.CreateDocument
Call docA.CopyAllItems (docTemp)
Forall item In docTemp.Items
If Not (Ucase(item.Name) = “$FILE”) Then
docTemp.RemoveItem (item.Name)
End If
End Forall
Call docTemp.CopyAllItems (docB)
Call docB.Save (False,True)
I’ve use ExtracFile and same rich t ext field in both A and B, get same issue.
Any help is appreciated in advance!