Agent.run do not work

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.

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

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//

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

Subject: agent.run do not work

What is the error you’re getting?

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

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.

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

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.

Subject: RE: agent.run do not work

Give your agent an alias and use that as your reference:

(A)|A

Subject: RE: agent.run do not work

Thanks for response. Its been crazy tried & did not work. It is very strange.