Hi, I´ve a serious problem and I can´t find the solution.
I´ve a form action button (on web) with the follow code: @Command ([ToolsRunMacro];“NEW”)
After I click on it, the form is processed (strange) but the agent do not run. Can anybody say to me why?
Note: the agent is fine.
Any help will be apreciated.
Tanks a lot.
Santiago.
hcl-bot
January 11, 2006, 11:36am
2
Subject: try this…
put your @formula to the bottom of the form in a hotspot with just one white space.
add a javascript to your button which should call the @function :
var numberOfLinks = document.links.length;
document.links[ numberOfLinks - 1].onclick();
so the javascript opens the last link on the page which is your hotspot.
Subject: Problem: WebAgent triggered from a Form Action Button
Hi Santiago,
Are your agent properties correct?
On the first tab:
Runtime:
Trigger: on event
Action menu selection
Target: None
On the second tab:
Set runtime security level:
Allow restricted operations
Subject: RE: Problem: WebAgent triggered from a Form Action Button
yes Rene, are correct
Subject: RE: Problem: WebAgent triggered from a Form Action Button
Hi Santiago,
Strange!
Is the agent signed with the right id?
Are there any messages in the log.nsf?
If you check the in the designer the option Agent - Log, does it say it did run?
What is the message if you save the form? If it is “Form processed” there might be an error after all in the agent.
If there is a blank screen the return url might be wrong.
I think you might have checked all this, but this is all I can think of on this moment.
I’ll give it a thought through the day, see if anything pops up in my mind.
Good luck anyway,
René
Subject: Problem: WebAgent triggered from a Form Action Button
Just move your agent call to the webquerysave event and have the action do a submit().
Subject: RE: Problem: WebAgent triggered from a Form Action Button
Thanks for the rresponse Tom, but I can´t. The agent MUST be run with the document open.In the WebQuerySave event I run another code.
Any other idea?
I need to solve this problem as soon as possible.
Thanks again.
Subject: RE: Problem: WebAgent triggered from a Form Action Button
What does the agent do that it needs to run while the document is open?
Notes agents that run on the server do not use the GUI of a web form but access the backend data of the document utilizing session.documentcontext.
How do you know the agent is not running?
Subject: RE: Problem: WebAgent triggered from a Form Action Button
The agent (in LotusScript) create a document with values that get of the current document (document context), but I don´t want to close the main document.
I noticed the agent is not running because the agent have “MessageBox” sentences in order to debbug on the console, and the console is show nothing.
Can you understand me?
(Thanks again)
hcl-bot
January 10, 2006, 2:47pm
10
Subject: RE: Problem: WebAgent triggered from a Form Action Button
Messageboxes will not work in a server based agent. All UI objects and classes are not allowed on server based agents.
Do you mean you are using print statements in the agent?
hcl-bot
January 10, 2006, 2:49pm
11
Subject: RE: Problem: WebAgent triggered from a Form Action Button
the messagebox sentence in a agent that run on server, produces a line in the console, such as print.
hcl-bot
January 10, 2006, 2:55pm
12
Subject: RE: Problem: WebAgent triggered from a Form Action Button
Did you try changing your action from [toolsrunmacro) to action to something like:
From notes help:
http://www.mercury.com/sales/leads.nsf/Process+New+Leads?OpenAgent
If you agent is failing, you need to debug where it might be failing by adding additional logging -print statements or log it to a text file so you know where it might be failing.
Check the log.nsf under misc. events - if the agent is getting initiated and failing, your error should be in there.
hcl-bot
January 10, 2006, 3:15pm
13
Subject: RE: Problem: WebAgent triggered from a Form Action Button
Thanks but this not work, because if i call the agent on this way, I can access to documentContext.And I can´t debbug, because the agent not run, never start (I’m looking the server console all the time)
Any other suggestion?