This sample script disables EDIT mode on the document once the FIELDSTAT field
is set to "Completed" and informs user by messagebox. You can use this script
also for documents that are signed, closed, or rejected, etc.
Sub Querymodechange(Source As Notesuidocument, Continue As Variant)
If Not(source.EditMode) Then
status = source.FieldGetText "FieldStat")
If (currentStatus = "Completed") Then Messagebox("Cannot edit document.
Document has already been Completed!")
Continue = False
End If
End If
End Sub
This was first published in November 2000