Hi,
I have two forms (parent and child). I am creating a child document and saving it. It is throwing an error as “Invalid Universal Id”.
My code is as below :
Below code is written in Click event of an action button in the child form.
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim session As New NotesSession
Dim db As NotesDatabase
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document
Set db = session.CurrentDatabase
parentunid = doc.ParentDocumentUNID
Dim parentdoc As notesdocument
Set parentdoc = db.GetDocumentByUNID(parentunid)
'Set parentDoc=db.GetDocumentByUNID(parentUNID)
Call doc.MakeResponse(parentdoc)
Call uidoc.Save
uidoc.Close
End Sub
In Post Save of the child form i have written the below code.
Sub Postsave(Source As Notesuidocument)
Dim doc As notesdocument
Dim parentDoc As notesdocument
Set doc = source.Document
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
'Set parentDoc=db.GetDocumentByUNID(parentUNID)
'Call doc.MakeResponse(parentDoc)
Call doc.Save(True,True)
End Sub
Please help me as i am unable to fix this.
Regards,
Sai.