I have this code in a button. I want to be able to broadcast to everyone who is on the server if a document is saved “Unassigned” The current code i have works on my machine because i have admin rights. But the code doesn’t work when from the clients because they dont have access. Is there anyway of getting around this. I was told to right a agent and run it on behalf of me. But for some reason thats not working for me either. Below are the two example that i tried.
In a Button*******
Unassigned:
serverName$ = "server name"
Dim job As String
job = {BroadCast "(!) New Unassigned Called"}
job2 = "Tell adminp process all"
consoleCommand$ = job
consoleReturn$ = session.SendConsoleCommand( _
serverName$, consoleCommand$)
****** Calls Agent with the code above **********
Dim s As New NotesSession
Dim db As NotesDatabase
Dim agent As NotesAgent
Set db = s.CurrentDatabase
Set agent = db.GetAgent(“Broadcast”)
If agent.Run = 0 Then
Messagebox "Agent ran",, "Success"
Else
Messagebox "Agent did not run",, "Failure"
End If
End Sub