?OpenAgent with Notes:// Protocol

Hi,

I’m trying to run an agent using the URL string notes://server/db/agent?openagent.

The agent does what its supposed to if I call it using http:// but if I use notes:// it doesnt work.

Any Ideas ?

Many thanks in advance.

Neil

Subject: RE: ?OpenAgent with Notes:// Protocol

I would be surprised if that were supported.

However, what does “it doesn’t work” mean?

If all else fails, create a form whose queryopen event runs the agent, then sets Continue=False?

Subject: ?OpenAgent with Notes:// Protocol

Well, in R5, OpenAgent was one of the unsupported Notes URLs; I can’t see that this has changed in ND6.x, although as usual, the Designer Documentation doesn’t make this clear.

Subject: Code to run the agent in Notes from the browser

OK, since I was looking for this and found these tidbits that directed me how to solve this, so I wanted to post them so the next person can figure it out quicker…

Use the following URL to open a form in a local database:

notes:///SOT2.nsf/RunGotcha?OpenForm

I used the PostOpen event, but imagine QueryOpen would work the same way:

Sub Postopen(Source As Notesuidocument)

' this module runs a Notes agent and exits the form

Dim session As New NotesSession

Dim db As NotesDatabase

Dim agent As NotesAgent



Set db = session.CurrentDatabase

Set agent = db.GetAgent ( "Gotcha" )



Call agent.Run ( )



source.Close ( True )

End Sub

This runs the “Gotcha” agent in the Notes client.

Hope this helps someone some day…

Dave Navarre

Chub Toad, LLC

Subject: RE: Code to run the agent in Notes from the browser

Has anyone figured out how to pass a parameter to the agent?

ex. notes://server/db/rungotcha?OpenForm&Title=testing

Subject: ?OpenAgent with Notes:// Protocol

notes://server/db/agent?openagent

Why do you have “notes:” in the front?

Maybe I am not following what you are doing,

I run agents using http://server/db/agent?openagent

Subject: RE: ?OpenAgent with Notes:// Protocol

He’s using a Notes URL. They’re distinct from what you’re talking about, which is a standard Domino url using http. URLs which use the notes:// protocol fire up the Notes client as opposed to accessing Domino resources.

Subject: ?OpenAgent with Notes:// Protocol

I’m trying to run an agent using the URL string notes://server/db/agent?openagent.

It won’t work. You will get a messagebox to the effect that this is not supported.

As a workaround you could create a form or page that runs the agent in its PostOpen, then open the form/page instead. Of course the agent would execute in the Notes client, not on the server, unless you use .runonserver().