17 Mar '12, 12am

Reuse web agents that PRINT to the browser in XPages #xpages

Make sure your agent is set to "Run as web user" in the agent properties Add the AgentSupport LotusScript library to your agent Initialize the ResultHandler class: Dim result as ResultHandler SET result = new ResultHandler that will take in the print statements Use Search & Replace in your agent and replace Print with result.prn Add at the end call result.save() In your XPage or CustomControl add the AgentSupportX SSJS library Get the result with a call to agentResult("[name-of-your-agent]") . You can process it further or display in in a computed field etc.

Full article: http://www.wissel.net/blog/d6plinks/SHWL-8SF7AH?Open