Do you want to save a uidoc in an action button or want an agent to perform an operation, but the validation process prevents the uidoc from saving causing an error? This simple function will allow you to take care of this process.
Function IsUIDocSaved ( uidoc As notesUIdocument ) As Integer ' boolean
Const uidocSaveErr = 4411
Const msgNotSaved = "The document was not saved due to insufficient supplied data."
Const msgSaved = "The current document is saved."
On Error Resume Next
If Err <> 0 Then
If Err = uidocSaveErr Then
' saving uidoc is not completed by querysave event for validation purposes.
' which in turn will give the appropriate message
Msgbox "Unexpected error: " & Chr$(10) & _
"Error No.: " & Err & " " & "Line: " & Erl & " " & Error$ & Chr$(10) & "In Module: " & "IsUIDocSaved"
Err = 0
IsUIDocSaved = True