Run in background and error

Hi, I would like to know how use “Run in background” option. I’ve an agent with the following setting:1. On event

  1. Action menu selection

  2. Target - none

I’ve not any references to UI classes but it doesn’t work.

I need to run it from a button in a view.

Thanks in advance for all advice.

Subject: run in background and error

Change:

Action menu selection to: Agent List Selection

Target: All Selected Documents

in the view action button, use the formula:

@command([toolsrunmacro]; “(insertagentname)”)

Subject: RE: run in background and error

Thx. My problem was that the code was all in a button, now I moved it in two different agent. One called through @command([toolsrunmacro];“agent1”) and the other(that should run in background) through @postedcommand([toolsrunmacro];“agent2”) and it seems ok.