Hi,
I get the error " Attempt to save nested form events" when I try to save the a new version of the form.
Here is the code which I have in Query Save event:
Sub Querysave(Source As Notesuidocument, Continue As Variant)
Dim uidoc As NotesUIDocument
Dim dateTime As New NotesDateTime( “Today” )
Dim workspace As New NotesUIWorkspace
Dim GrantorType As String
Dim Grantor_1Type As String
GrantorType = Source.FieldGetText(“Grantor”)
Grantor_1Type = Source.FieldGetText(“Grantor_1”)
Set uidoc = workspace.CurrentDocument
If source.IsNewDoc = True Then
Call uidoc.FieldSetText( "Grantor_1", GrantorType )
Call uidoc.save
Else
Call uidoc.FieldSetText(“Modifications”,“”)
Call dateTime.AdjustYear(-1)
Call uidoc.FieldSetText(“FirstName”, “”)
Call uidoc.FieldSetText(“LastName”, “”)
Call uidoc.SaveNewVersion
Call uidoc.FieldSetText(“Form”, “New Info”)
Call uidoc.save
Call uidoc.Close
answer% = Messagebox(“Your new form created.”,0 ,“Process Complete”)
End If
End Sub