-
I have a Rich Text field “Body” on Form A.
-
Form B contains a field called “Body” with the Default Value formula set to “Body”. Form B inherits field values from the selected document.
-
I open a document created with Form A and click a button with the formula " @Command([Compose]; “Form B”) "
-
The Body field inherits everything except when I click on the attachment icon I get “Note Item Not Found”
I have read about this error on these forums but can’t find a workaround. Can anybody tell me how to inherit the file attachments as well ??
TIA,
Mark.
Subject: How to inherit attachments in Rich Text fields
Attachements are not inherited, see my post herehttp://www-10.lotus.com/ldd/nd6forum.nsf/ShowMyTopicsAllThreadedweb/e7a8bbeed3c3f18485256f8e0075e623?OpenDocument
Subject: RE: How to inherit attachments in Rich Text fields
But you didn’t follow up to my answer to your original post to say whether my suggestion worked (and which one worked). Since you had the benefit of someone else helping you, maybe you could pay back by reporting on what exactly you ended up doing to solve the problem.
- Andre Guirard, IBM/Lotus Development
Useful blog: Best Practice Makes Perfect
For faster answers, be C R I S P Y
Subject: RE: How to inherit attachments in Rich Text fields
You are absolutely right, it is unfair.Being a dumb user who can just play around with some @formula, I asked our consultand for that and he supplied a lotus script agent that copied the RT field and the attachement came along.
This is the code
Sub Initialize
Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim curdoc As NotesDocument
Dim newdoc As NotesDocument
Dim rtitemA As Variant
Dim rtitemB As Variant
Dim recal As Variant
Set uidoc = workspace.CurrentDocument
Set db = session.CurrentDatabase
Set curdoc = uidoc.Document
'Crea Risoluzione
Set newdoc = New NotesDocument( db )
newdoc.Form = "#RM"
newdoc.PUid = curdoc.UniversalID
newdoc.PDataInvio = curdoc.PDataInvio(0)
newdoc.PUserInvio = session.UserName
newdoc.RStato = "4"
newdoc.DCodice = curdoc.DCodice(0)
newdoc.DTitolo = curdoc.DTitolo(0)
newdoc.CCodice = curdoc.CCodice(0)
newdoc.CTitolo = curdoc.CTitolo(0)
newdoc.ROggetto = curdoc.POggetto(0)
Set rtitemA = newdoc.CreateRichTextItem( "RRis" )
Set rtitemB = curdoc.GetFirstItem( "PRis" )
Call rtitemA.AppendRTItem( rtitemB )
Call rtitemA.Update
Set rtitemA = newdoc.CreateRichTextItem( "RRapp" )
Set rtitemB = curdoc.GetFirstItem( "PRapp" )
Call rtitemA.AppendRTItem( rtitemB )
Call rtitemA.Update
newdoc.ZDeleted = "0"
newdoc.ZUpdTime = Now
newdoc.ZUpdUser = session.CommonUserName
recalc = newdoc.ComputeWithForm( False, False )
Call newdoc.Save(True, False)
End Sub