Lotus Script?

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

Subject: Lotus Script ?

If it runs locally it’s a permission issue. Does your ID have permission to use the server console?

Did you fill in the agent properties Run On Behalf of?

Also on the same tab, you might want to play with the Runtime Security Level … by default it is 1 which denies all unrestricted scripts to run.

I don,t know if sending a command to the console is restricted, but the odds are good that it is.