UNID and $Ref - lotus script

I have two different documents in db and I need to read UNID of first one and copy its value to $Ref of another one in order to make the second documnet in a view like a response document. could you show me how to do it in lotus script please? thank you, jakub

Subject: UNID and $Ref - lotus script

Take a look at the method .MakeResponse in the NotesDocument class.

Here is the example from the Designer Help:

Dim session As New NotesSession

Dim db As NotesDatabase

Dim view As NotesView

Dim docA As NotesDocument

Dim docB As NotesDocument

Set db = session.CurrentDatabase

Set view = db.GetView( “All documents” )

Set docA = view.GetFirstDocument

Set docB = view.GetNextDocument( docA )

Call docB.MakeResponse( docA )

docB.Form = “Response”

Call docB.Save( True, True )

hth