Sreekanth S
Sreekanth S

Reputation: 13

how to pass the current document id in Lotus Notes to a Lotus Script/Java agent

I am trying to customize Lotus Notes form by calling a agent on document submit. How do I pass the document id of the current document(new calendar item/new mail etc) to the java agent?Can this be done using javascript?

Upvotes: 1

Views: 949

Answers (1)

Richard Schwartz
Richard Schwartz

Reputation: 14628

First of all, you can set up an agent to run automatically on all new and modified documents in a database. If you do that, then you don't have to pass anything, as the agent will get a reference to the new/modified document via the NotesDocument.UnprocessedDocuments property.

But secondly, if you're using the Javascript NotesAgent.runOnServer() method to run your agent, that method takes a noteid as an argument. You can access the noteid via the NotesDocument.getNoteID() method and just pass it as the argument.

Upvotes: 3

Related Questions