Notes Tips - Tip #1

Notes Tips

When I first started doing Lotus Notes/Domino I created a database to capture all of my “Notes On Notes”… Basically Hints, Tips and things I learned or crafted that would help me out in future projects. So with that said, here is Tip #1.

Call an Agent Using Javascript Passing Parameters

1) Create a COMPUTED TEXT field called DBServerPath and add the following code to the value:

"/" + @ReplaceSubstring(@Subset(@DbName;-1);"\\";"/")

2) In the onClick event of your button add the following Javascript Code (substitute “AgentName” for the name of the agent you wish to run):

var dBPath = document.forms[0].DBServerPath.value
location.href = dBPath + “/AgentName?OpenAgent&Parameter=WhateverHere”

NOTE: that in the agent the context is not the document that called the javascript but the agent itself so you cannot access the DocumentContext.

Leave a Reply

Please note: Comment moderation is in use and may delay your comment's debut.
There's no need to post your comment twice if you don't see it right away.


Light up the night!: Globally Recognized Avatars (or: gravatars) are how some people make those little icons appear next to their names in replies here. Get one of your own for free today and use it everywhere you go!