Examples: HasRunSinceModified
This code, used in a hotspot button on a form, runs an agent only if the agent has been modified since the last time it was run.
Sub Click(Source As Button)
Dim s As New NotesSession
Dim db As NotesDatabase
Dim agent As NotesAgent
Set db = s.CurrentDatabase
Set agent = db.GetAgent("myAgent")
If agent.HasRunSinceModified = False Then
agent.Run
Messagebox "Agent ran",, "Success"
Else
Messagebox "Agent has not changed since created or last run" _
,,"Failure"
End If
End Sub