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
    Messagebox "Agent ran",, "Success"
    Messagebox "Agent has not changed since created or last run" _
  End If
End Sub