Run agent which is in another database

Hi,

I would like to run a agent which in another database.

In my “A” database I have a action button when I click that, is should run a agent which is in database “B”.

I also wanted to do the same above for Script Libray. would that be possible ?

I would like to do that in Client.

Thanks in advance for any advice.

Subject: Run agent which is in another database

By using NotesDatabase & NotesAgent classes, you can achieve this. Following is the sample code:

Sub Initialize

Dim session As New NotesSession

Dim db As NotesDatabase

Dim agent As NotesAgent



Set db = New NotesDatabase( "<Server Name>", "B.nsf" )



Set agent = db.GetAgent("<Agent Name>")



If Not(agent Is Nothing) Then

	Call agent.Run

End If

End Sub

Subject: RE: Run agent which is in another database

Thank you very much Balu.

Subject: Run agent which is in another database

You cannot access script libraries in another database. You can however inherit script libraries from a template into multiple databases.

Subject: RE: Run agent which is in another database

Subject: RE: Run agent which is in another database

Hark, Thanks for the hint.