| Brief Description: Change parent is possible 
 Full Description:
 I use a LotusScript procedure to change the parent of a document; maybe it will help you.
 
 Curdoc is the current document; whcih I want to connect to another one.
 Refdoc is the document I want to be the parent document
 Depending on a value in the current document I select the parent document in a view
 Using the formula MakeResponse I make the current document a responsedocument to the reference document
 
 Sub Queryclose(Source As Notesuidocument, Continue As Variant)
 Dim NS As New NotesSession
 Dim WS As New NotesUiWorkspace
 Dim db As NotesDatabase
 Dim view As NotesView
 Dim refdoc As NotesDocument
 Dim curdoc As NotesDocument
 Dim Competency_name As String
 Set db = NS.CurrentDatabase
 Set view = db.GetView("(ByName)")
 Competency_name=Source.fieldGetText("Parent_Competency")
 Set refdoc=view.GetDocumentByKey(Competency_name)
 Set curdoc=Source.document
 Call curdoc.MakeResponse(refdoc)
 Call refdoc.save(1,1)
 Call curdoc.save(1,1)
 Call WS.ViewRefresh
 End Sub
 
 
 Author:
 Wayne Brennan
 Date:
 Friday, 2/12/99 3:27 PM EST
 Subject:
 Re: I need a genius... yah YOU!
 
 
 
 
 You can get a handle on the document from the QUERYSAVE agent.
 
 You get a handle on it by using the DocumentContext Property of the Session class...
 
 Dim session As New NotesSession
 Dim doc As NotesDocument
 Set doc = session.DocumentContext
 
 At this point you can make any modifications to the "doc" that you want....
 
 Hope this helps....
 wayneb@ussinc.com
 
 
 previous page
 
 
 |