This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Sep 1, 2011, 8:03 PM
3 Posts

Can you pass values to an agent from a button?

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.2
  • Role: Developer
  • Tags: agent
  • Replies: 3
 
 
Hello,
 
Can you pass values to an agent from a button?  In the past I have passed values via url to agent.
Is there a way to pass some values using ssjs?
 
 
 Thanks,
 
Kev
 
 
 
Sep 1, 2011, 8:40 PM
298 Posts
sure
You can still call your agent via a url with parameters and build the url programtically (see the link control). Or, you could have SSJS that got the NotesAgent class for that agent and then pass in a documentContext (8.5.2 only). Note that for the second option the agent has to be set as "Run as web user" for the agent to run and not throw an error. Hoping they fix this in 8.5.3... Howard
Sep 1, 2011, 9:47 PM
272 Posts
Re: Can you pass values to an agent from a button?
...and last but not least you can use a profile document or a normal document [with Agent.run(noteid)].
 
Sven
Sep 1, 2011, 10:30 PM
64 Posts
AJAX is the cleanest method, imho...
- XPages include dojo, which has dojo.xhrGet() & .xhrPost() to invoke a GET or a POST using AJAX.  They're quite simple to use, very repeatable, and work with any version of Domino out of the box.  LotusScript will require some extra code to get the values from JSON, but there are libraries on the 'net for that.  Google and enjoy.
 
Hope this helps...

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal