RunOnServer data not displaying on backend
I previously created a Notes client form that used the client ODBC
connection to return several pieces of SKU information from the AS/400 when
the user clicks a validate button. Basically it works like this: When
the form is opened, a user can enter 1 or more SKU numbers. They then press a
validate button and it returns an SKU description, which includes hand quantity, locaton, etc. (Everything was working well.) I then
converted the form by moving the code that was originally in the button to
an agent. The agent is called from the same button via the RunOnServer
method. This too seems to work fine on the back end and when I debug the agent, I can see the data I need is there. However, I can not get the newly
returned data to display back in my form. I've been looking for days for a solution with no luck. Please help!
Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.
Was/Is your agent using any front-end classes? That would be the first
culprit to look for if it fails (i.e. returns a status = non-zero). If
you're well beyond that, what does the agent being invoked by RunOnServer
do and where does it put the data? Since RunOnServer only returns a status
message the data is consumed and disposed by that agent, there's no way
to directly communicate it back to the calling agent. That's why it is
typically used with web applications, where they can create one or more
documents in the back-end that the web app can redirect the browser to.
When using a Notes client-based app you can pass the current documents
NoteID to the agent, have the agent update that doc, and then if successful
you can use NotesUIDoc.Refresh to see the updated results. Good Luck!
Dig Deeper
-
People who read this also read...
This was first published in December 2002