Background client thread agent and Hide when

Hi,

I have a Form A in which on click of a button I need to create thousands of documents of Form B based on the details entered by the user in the Form A. To keep the client free for the user while the documents of Form B are created, I use the following simple approach.

  1. In Form A, on click of the button call an Agent C that will run in the ‘background client thread’.

  2. The Agent C will call another Agent D that will run on the server and create the documents of Form B.

  3. When the Agent D is done with its work, the Agent C will inform the user using a messagebox that the work has been done and end.

Now, I would like to unhide an action on the Form A when the documents of Form B have been successfully created by the agent combo. But since neither of the agents allows access to UI classes, I am unable to refresh the hidewhen formulas on Form A.

Does anybody have a solution?

Thanks.

Subject: Background client thread agent and Hide when.

You can add the ui refresh code on the button itself. If formulas dont work use lotuscript to call the agent and after the agent is complete, call a ui refresh updating the action.

Subject: RE: Background client thread agent and Hide when.

Thanks, Rajesh. But you cannot make an agent to run in the background using lotusscript. And no, using formula to save or refresh the document does not work either.