Eric Spencer commented on Feb 13, 2012

Re: Example: Running an agent on selected documents in the iNotes inbox

Marco and Pablo - Thanks for the comments. I've updated the example.

Marco Tiraferri commented on Aug 22, 2011

Re: Example: Running an agent on selected documents in the iNotes inbox

Successfully tryed this example... just a little bug (or my misunderstanding??)

When i run the agen it works (change subject of selected docs) but always give me the error message "error running agent. error code 200" just after the "agent completed mesage".

I have changed the code from:

-----------------------------------------------------------------------------

xhr.onreadystatechange = function()

{

if(xhr.readyState == 4) {

if(xhr.status == 200) { // success

// Set status message and/or pop up an alert

AAA.EVI.sr (2, "", "Received:" + xhr.responseText, true);

alert("Agent completed");

alert("xhr.responseText:" + xhr.responseText);

// Refresh the Inbox

AAA.DSq.ELU(null, 'e-actions-mailview-inbox', 'ESV');

}

else // error

AAA.EVI.sr (2, "", "Error code " + xhr.status, true);

alert("Error running agent. Error code: " + xhr.status);

}

};

--------------------------------------------------------------

to :

--------------------------------------------------------------

xhr.onreadystatechange = function()

{

if(xhr.readyState == 4) {

if(xhr.status == 200) { // success

// Set status message and/or pop up an alert

AAA.EVI.sr (2, "", "Received:" + xhr.responseText, true);

alert("Agent completed");

alert("xhr.responseText:" + xhr.responseText);

// Refresh the Inbox

AAA.DSq.ELU(null, 'e-actions-mailview-inbox', 'ESV');

}

else { // error

AAA.EVI.sr (2, "", "Error code " + xhr.status, true);

alert("Error running agent. Error code: " + xhr.status);

}

}

};

just a question... is it possible to pop-up some feedbak from the called agent?

print send output to the domino console

message box send output to the inotes console

but i need the agent's output to be showed to the user.

Thank's

Marco

Pablo Solano commented on Jul 25, 2011

Re: Example: Running an agent on selected documents in the iNotes inbox

I'm getting this error when I click my new action menu:

Domino Release 8.5.2 (Windows NT/Intel)

$HaikuForm - 401

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)

Extension Forms File 8.5.2

Extension Forms File user version: 0

07/25/2011 09:19:21PM A problem has occurred which may have caused the current operation to fail.

07/25/2011 09:19:21PM Object doesn't support this property or method

07/25/2011 09:19:21PM http://lnweb/mail/administ.nsf/iNotes/Proxy/?OpenDocument&Form=l_ScriptFrame&l=en&gz&CR&MX&TS=20110722T222230,96Z&TSX=20110722T232501,12Z&charset=ISO-8859-1&charset=ISO-8859-1&ua=ie: 86

07/25/2011 09:19:21PM runAnAgent("ACTION17")

Any help will be appreciated.