I'm not familiar with Lotus Notes. The task is the following: I need to implement the plug in which listen "Calendar Entry created/deleted" event. And send this scheduling (iCal) data to some web service so that it could be synchronized in the another system. I would appreciate if somebody could give me some vector, where I need to find solution, how to subscribe to such an event? Thanks
1 Answers
You need to look into agents, specifically the type that runs when documents are created / modified. For deletes look at the QueryDocumentDelete event on the database. Between those two code points you can add the necessary logic to respond to calendar (or other) document creation and deletion.
You'll have to check the documents form to determine if the document being acted upon is a calendar event, but after that it should be straightforward.
Note there can be a delay between when a document is created and when the agent runs.
UPDATE: Within the agent, you'll need to get the unprocessed documents collection from the database object and operate on that. Using LotusScript it would look like this:
Dim s as New NotesSession
Dim db as NotesDatabase
Dim docCollection as NotesDocumentCollection
Set db = s.CurrentDatabase
Set docCollection = db.UnprocessedDocuments
Then from there you can loop over the document collection and process each NotesDocument object.