Before new mail arrives - trigered when opening document?

HiI have a “before new mail arrives” agent with the folowing formula code:

Modify field ‘ReturnReceipt’: Set to ‘0’

Tested and runned in perfection. So I changed the mail template. One day after, all mail databases has this agent, but it runs only after opening the document!!!

If I open any mail database with designer, open that agent and save it again, it beggins working well.

Note: the agent is signed by administrator and I worked always with administrator ID

Any help apreciated.

Subject: clarification please

How did you modify the template?What do you mean by “runs only after opening the document” - do you mean when you resave the agent and thus resign it, or that it actually runs on the open action on the client?

Did you try running the diagnostic ‘test’ from the designer? When the agent is in the “funny” state, run that diagnostic and if it does not make it clear to you what is wrong post the output in the forum.

Subject: Before new mail arrives

HiThank you for your attention.

1 - Just open mail85.ntf with designer on server and add the agent as described.

2 - the only thing the agent does is to change a field value. I can check this, watching the document properties. What I mean with “runs only after opening the document” is:

When a mail arrives to user mail database, the field value is supposed to be changed. But it is not. After opening that document for the first time, then the field value is changed.

3 - The following will occur when this agent is run:

‘CN=Notes Admin/O=Acme-Sa/C=PT’ is allowed to run Personal/Formula/Simple Agents on ‘CN=DOMINO01/O=acme-Sa/C=PT’.

The agent will run on behalf ‘CN=Notes Admin/O=Acme-Sa/C=PT’

Agent will be run by the Router as each new mail is delivered.

Home mail server for ‘CN=Notes Admin/O=Acme-Sa/C=PT’ is ‘CN=DOMINO01/O=Acme-Sa/C=PT’. Note: If needed, agent may failover to another server.

Started running agent ‘Apaga ReturnReceipt’ on 05-09-2010 17:41:27

Running on new mail messages: 1 total

ERROR: No document has been selected.

Testing: Modified field in 0 document(s)

Done running agent ‘Apaga ReturnReceipt’ on 05-09-2010 17:41:27

Subject: the problem is in

The problem is in how you are selecting the document to operate on.The pre-delivery agens have the document being delivered in the context, not in the unprocessed documents.

More details and examples in this article for this trigger:

Agent FAQ:

http://www-10.lotus.com/ldd/46dom.nsf/7e6c7e584a76331b85256a46006f083e/574c99ccb345839185256976004e811e?OpenDocument