Manage Learn to apply best practices and optimize your operations.

Check Valid Signature For Agents

Admin personnel come and go & once their PAB Person's document were deleted,
previous agents last saved by them may not work (due to some access-control
restrictions) as they become invalid signature(s).

Insist that the developers plug in this function to check for who last signed
(saved i.e.) an agent. If an invalid signature is encountered, ask them to
code a routine to send a notification email to the admin group.

This function will check for the valid signature against the public address
book.
Function IsAgentValidSignature (agent As NotesAgent) As Integer

Dim session As New NotesSession
Dim db As NotesDatabase
Dim db_PAB As NotesDatabase
Set db_PAB = session.GetDatabase(session.CurrentDatabase.Server,
"names.nsf")

Dim strOwner As String
strOwner = agent.Owner

Dim searchFormula As String
searchFormula = "Form = ""Person"" & Owner = """ + strOwner + """"

Dim dateTime As New NotesDateTime("1/1/1971")
Dim docCollection_PAB As NotesDocumentCollection
Dim doc_PAB As NotesDocument
Set docCollection_PAB = db_PAB.Search(searchFormula, dateTime,0)

If docCollection_PAB.Count <> 0 Then
Set doc_PAB = docCollection_PAB.GetNthDocument(1)
If doc_PAB.Owner(0) = strOwner Then
IsAgentValidSignature = True
Else
IsAgentValidSignature = False
End If
End If

End Function


Example:
-----------
Sub Initialize
Dim session As New NotesSession
Dim agent As NotesAgent
Set agent = session.CurrentAgent

If IsAgentValidSignature (agent)= True Then
'... Process agent code
Else
Call SendNotificationMail()
End If
End Sub

This was last published in November 2000

Dig Deeper on Domino Resources - Part 3

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close