Reputation: 100
Is it possible to create a NotesDocument with a Response, where only the response-document is shown on creation, and where both are only saved in the database at the moment that the Response-Document is saved?
I have a Notes-Application for registering work shifts. At the beginning of each shift, the new shift leader have to fill in a handover form in which details about the handover are stored. The shift-Form is the main Form to which all other Forms (such as Handover, in-shift Events) should be response-documents.
At the start of a new work-shift I would therefore wish to create a new Shift-Document, and a Handover-Document. Since the handover takes place first, and I want my users to be able to cancel going into a new shift before they save the Handover-Document, I would want:
How would I do this in Lotusscript?
Upvotes: 1
Views: 222
Reputation: 467
You must always save the Parent document first before you can create response documents to it.
However, you can use this workaround.
Create a dummy form 'Shift with Handover' where the shift leader can enter the data for both the Shift document and the Handover document.
Then, in the QuerySave of this form:
Upvotes: 0
Reputation: 940
You can start by creating the child doc (Handover doc) and then make it a response doc after a parent doc has been created and saved.
Call childDoc.MakeResponse( parentDoc )
Call childDoc.Save( True, True )
The parent doc must be saved (i.e. have a document unid) in order to make the child doc a response to the parent doc.
Upvotes: 2