Response

I have two documents who are response to response they have the same main document, now I want to place a button on the first doc and let him create the second doc. After the second doc is created I make him a response to the main doc. But he appears as a response to the doc from which he was created.

When i change the doc to document he wont appear as a response!

I use

Call ugovor.MakeResponse(predmet)

Help please!

Subject: Response

We will need a little bit mor of your code, especially where you set your “predmet” document.

Be sure that “predmet” is really the main document.

Jens

Subject: RE: Response

Predmet is the main document

Here is the code!

    Dim ws As New NotesUIWorkspace

Dim s As New NotesSession

Dim db As NotesDatabase

Dim uidoc As NotesUIDocument

Dim doc As NotesDocument

Dim ugovor As NotesDocument

Dim predmet As NotesDocument

Dim view As NotesView

Dim key As String	

Set db = s.GetDatabase("My server","mybase.nsf")

Set uidoc = ws.CurrentDocument

Set doc = uidoc.Document

Set view = db.GetView("(docpredmet)")



key = uidoc.FieldGetText("docProces_ID")

Set predmet = view.GetDocumentByKey(key)



Dim dt As New NotesDateTime ("")

Call dt.SetNow

Call dt.AdjustMonth(1)



										

Set ugovor =  New NotesDocument(db)				

ugovor.Form = "UgovorWIC"							ugovor.modem=doc.modem

ugovor.doc_status = "Otvoreno"

Set ugovor.doc_rok = dt



ugovor.ComputeWithForm False,False

Call ugovor.MakeResponse(predmet)

Call ws.EditDocument(True,ugovor)

Subject: RE: Response

You have to save the document after you have used the MakeResponse method

Subject: RE: Response

Well that is the problem, the doc is a contract and I use the action to print it bianco and when it is signed the operator enters the remaining data and saves it then manually and whenn its done he appears as a response to the doc from which he was created!

Subject: RE: Response

Then it depends on the properties of the form of the newly created document. Check the Type field. Should be document rather than response to response. And you’ll have to call the makeResponse method from within your querysave of that form, because if you don’t save your newly generated doc in the same code that creates it, the makeResponse method in this sub is of no use.