iNotes 8.5.1 action agent

I am trying to create a new action button on the message form.

Is is possible to run a LotusScript agent from this new action button? The LotusScript agent uses functions that aren’t available in either Java or JavaScript.

The agent works with the attachments on the form and then sends the message.

I am having a difficult time searching for a solutions.

Thank you!

Subject: Sorry…

… that I asked a stupid question that no one wants to answer.

I have searched this forum for an answer before asking the question, and I tried everything that I have found and I am having no luck.

Subject: Yes to your first point.

Is is possible to run a LotusScript agent > from this new action button?

Yes. You can use a simple action or @Function of:

@Command( [RunAgent] ; agentName )

There are also methods in Java and LotusScript. I would recommend reading the designer help rather then looking on the forums.

Subject: Still not able to run agent

This is my code in the Custom_JS_Lite:

function com_ibm_dwa_ui_MYFUNC_actionSelectedDocs(sId){

var selected_docs = API_GetSelectedDocs_Lite();

var sAgentName = "MyAgent";

alert("BEFORE agentrun...\n\nUNIDs of selected docs: " + selected_docs);

@Command( [RunAgent] ; sAgentName);

alert("AFTER agentrun.");

}

function Custom_Scene_Actions_Lite(s_MenuID){

var a = [{title:"Start agent", find_id: "new", id: "agent1", before: true,

	action:"com_ibm_dwa_ui_MYFUNC_actionSelectedDocs{GIy: \'e-actions-mailview-folder-image1\'}", 

	help_text:"some hover text"}];

addActionsLite( s_MenuID, true, a );

}

Some success:

  • the action appears in the UI (mailview - $Inbox)

  • both alerts appear, the first with proper content

Concerning the @Command, firebug reports “missing ) after argument list”

and marks that line: @Command( [RunAgent] ; sAgentName);

The agents “MyAgent” exists in the MyForms85.nsf, all involved databases

have “iNotes/MyForms85.nsf” in the $FormsTemplateFile field of their icon.

What’s wrong? / How would it be right?

Thanks a lot for your help!

Nicolas