PermaLink Run agent in the background - via LotusScript04/09/2008
Lotusscript
Notes 6 introduced the ability to run an agent in a background thread. You enable this behavior by checking the Run in background client thread property in the Agent Properties dialog box:

Run in background client thread

Since no good deed in Lotus Notes goes unpunished, Domino Designer displays the following message box every time you save the agent:

A runtime error will occur if this agent requires user interaction

As a result, users can run this agent in a background thread if the agent the agent is executed from the Notes Actions menu:



or using the following formula code:

@Command ( [ToolsRunMacro]; "Run me in the background, baby!" )

What if you want to trigger the same agent via LotusScript? Unfortunately, LotusScript will not run an agent in the background, regardless of whether the above agent property is checked.

However, you can hack your way around this limitation by having your LotusScript code open a form in the Notes UI that executes the above @Command in the Postopen event. Provided that your LotusScript to opens and closes the NotesUIDocument immediately, users will never know what's happening.

All credit for this nifty trick goes to Chhanno L Verma, who answered his own question in the Notes/Domino 6 and 7 Forum.
Comments :v
No comments.
Credits
NuTechs Powered by Domino
Search
Calendar
August 2008
Su
Mo
Tu
We
Th
Fr
Sa
2
3
5
8
9
10
11
13
14
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Monthly Archive
Get Real, Detroit!
Real Detroit Weekly
SWARM
Service
With
A
Rapid
Motion


-- old Rally's Hamburgers credo
By Category
The BlogRoll
About
Contact Me
Contact me, Michael Sobczak, using this e-mail address:

my first initial my last name at Yahoo dot com
Recent Entries
No Recent Blogs
Powered by
Blogsphere