hcl-bot
December 27, 2006, 2:09pm
1
Hi All,
I am trying to call agent A from agent B using lotus script.
Here is the code:
Set db = session.CurrentDatabase
Dim agent As NotesAgent
Set agent = db.GetAgent(“(A)”)
agent.Run
It gives an error in the line agent.run…
Also looked into designers help, also tried call agent.run…
I just want to call the agent A from B…
Any suggestions would be appreciated. Thanks in advance.
hcl-bot
December 27, 2006, 2:16pm
2
Subject: agent.run do not work
you are missing the ‘Call’ in front of the agent.Run
Dim Agent As NotesAgent
Set Agent = db.GetAgent(“A”)
Call Agent.Run
hcl-bot
December 28, 2006, 5:51am
3
Subject: agent.run do not work
Hema,
What is condition of agent selected to run. Is this on “selected documents” or “all documents in the database”.
Try changing the selection criteria.
BR//
hcl-bot
December 28, 2006, 7:14am
4
Subject: RE: agent.run do not work
hema, check the agent property…select the runtime property as
“Agent list selection” and set the target as “none” and then try this code
Dim s As New NotesSession
Dim db As NotesDatabase
Dim agent As NotesAgent
Set db = s.CurrentDatabase
Set agent = db.GetAgent(“(A)”)
call agent.Run
i think this time it will work
hcl-bot
December 28, 2006, 4:13pm
5
Subject: agent.run do not work
What is the error you’re getting?
hcl-bot
December 27, 2006, 2:17pm
6
Subject: agent.run do not work
Hi Have you checked that the agent exist and the it is the corect name you have entered.
If it is a Hidden agent you shall remember the Parantes.
The following Code is working well
Dim ses As New NotesSession
Dim Curdb As NotesDatabase
Dim Agent As NotesAgent
Set Curdb= ses.CurrentDatabase
Set Agent = CurDb.GetAgent( “Agentname”)
Agent.Run
hcl-bot
December 27, 2006, 2:43pm
7
Subject: RE: agent.run do not work
Thank you for your response. I have tried both agent.run / call agent.run. I also used Run in upper & lower case.Any suggestions would be appreciated. Thanks in advance.
hcl-bot
December 27, 2006, 2:54pm
8
Subject: agent.run do not work
Shouldn’t the line:Set agent = db.GetAgent(“(A”)
Be either:
Set agent = db.GetAgent(“(A)”)
Or:
Set agent = db.GetAgent(“A”)
// Ken, http://www.noteshound.com
hcl-bot
December 27, 2006, 3:03pm
9
Subject: RE: agent.run do not work
Thanks for your response. It was a typo in this posting. Actually I have used Set agent = db.GetAgent(“A”) Or Set agent = db.GetAgent(“(A)”)
Any suggestions would be appreciated. Thanks in advance.
hcl-bot
December 27, 2006, 3:27pm
10
Subject: RE: agent.run do not work
Give your agent an alias and use that as your reference:
(A)|A
hcl-bot
December 27, 2006, 3:44pm
11
Subject: RE: agent.run do not work
Thanks for response. Its been crazy tried & did not work. It is very strange.