i have a rich text field for attachments on a form that need to be editable for and [Admin] role only. i want others to be able to see and open the attachments, but not have an editable field where they could remove the attachments. i created 2 richtextfields in which one is editable and the other is computed to itself. the hide whens work fine based on the role and the fields, but i’m having a problem with copying what’s in editable richtextfield 1 to computed richtextfield 2. i am using the code below to clear out field 2 each time and load it back with whatever is in field one. it looks as if it works, but when i go back in the doc and try to open the attachment… i get “note not found” and the file is gone, but icon stays in the richtextfields. can anyone help??
thanks in advance,
jason
Sub Querysave(Source As Notesuidocument, Continue As Variant)
Call source.fieldclear(“richtextfield2”)
End Sub
Sub Postsave(Source As Notesuidocument)
Dim rtitem1 As Variant
Dim rtitem2 As Variant
Set rtitem1 = doc.getfirstitem(“richtextfield1”)
Set rtitem2 = doc.getfirstitem(“richtextfield2”)
If rtitem1.type = richtext Then
Call rtitem2.appendrtitem(rtitem1)
End If
Call doc.save(True, True)
End Sub