Use "CSEventNotes" 'библиотека класса ErrandObj здесь
Sub ProcessViewCommand(LAction As Long)
Dim collection As NotesDocumentCollection
Dim note As NotesDocument
Dim session As New notessession
Dim csErrandObj As New ErrandObj
Dim vContinue As Integer
vContinue=False
Set collection = session.currentdatabase.unprocesseddocuments
If(LAction<>ERRAND_CREATE) Then
If (collection.count = 0) Then
Exit Sub
Else
Set note = collection.getfirstdocument()
End If
End If
If CanProcessCommand(LAction, note) Then vContinue=True
If ( vContinue ) Then
Select Case LAction
Case ERRAND_CREATE
Call csErrandObj.create
Case ERRAND_SEND
Call csErrandObj.send( note )
Case ERRAND_DECLINE
Call csErrandObj.decline( note )
Case ERRAND_CHANGE_EXECUTOR
Call csErrandObj.change_executor( note )
Case ERRAND_CHANGE_TODATE
Call csErrandObj.change_todate( note )
Case Else
Goto done
End Select
End If
If Not(vContinue) Then Goto Done
note.save True,False
Done:
If(Not(csErrandObj Is Nothing)) Then Delete csErrandObj
Dim ws As New NotesUIWorkspace
Call ws.ViewRefresh
End Sub