Subject: how can I Give the possibility to unlock the document for the role Admin
If you are using the built-in document locking, you can create a LotusScript agent that only your Admin role people can see/run. Then you can add an action in the view that calls that agent.runonserver and specifies the doc to unlock.
Hope this makes sense - I could share code if needed.
Subject: RE: how can I Give the possibility to unlock the document for the role Admin
YES it is a good idea with an action button simple it arange me to unblock the document if i want to … Can you give me the simple code i can write in my button to unblock the document .
Subject: RE: how can I Give the possibility to unlock the document for the role Admin
The action button could look something like this (This is bare minimum, there are better ways to handle the selection of which doc to run the agent against)
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim s As New NotesSession
Dim agent As NotesAgent
Set agent = s.CurrentDatabase.GetAgent("MyUnlocker")
Call agent.RunOnServer(ws.CurrentDocument.Document.NoteID)
End Sub
The agent then doesn’t need to be much more than:
Sub Initialize
Dim doc As NotesDocument
Dim s As New NotesSession
Set doc = s.CurrentDatabase.GetDocumentByID(s.CurrentAgent.ParameterDocId)
Call doc.UnLock
End Sub
The key is to have the agent run as someone with Manager access to the database, and to change the security setting for who can view/run the agent.