Hi there,
I’m creating an script that should permit user edition on a document.
The problem is there are a flow to follow and some restrictions to follow too.
When a document is created all users should edit and make actions on it, in this first stage, the document’s name is “Prospect”.
But when the document goes to the next flow, only the manager and the doc’s author must edit and make actions, the other users only can read the document. The document’s name changes to “Active” or “Oportunity”, depending the result of the action on the previous stage.
I started the script but couldn’t find a solution.
Can you help me to solve this pluzze??
Thanks in advance…
Here is the code on the Prospect doc’s QueryModeChange.
Sub Querymodechange(Source As Notesuidocument, Continue As Variant)
Dim Workspace As New NotesUIWorkspace
Dim Ns As New NotesSession
Dim uiDoc As NotesUIDocument
Dim Doc As NotesDocument
Dim DB As NotesDatabase
Dim item As notesitem
Dim user$
Dim rejeitado As String
Dim ACLLEVEL_MANAGER As Integer
Dim Author As String
Set DB = NS.CurrentDataBase
Set uiDoc = Workspace.CurrentDocument
Set Doc = uiDoc.Document
formulario = uidoc.FieldGetText("formulario")
If formulario <> "Active" And formulario <> "Oportunity" Then
continue = True
If ( DB.CurrentAccessLevel = 6 Or db.CurrentAccessLevel > 1) Then
continue = True
End If
End Sub