Link to home
Start Free TrialLog in
Avatar of gregkling
gregkling

asked on

Agent/Script to run on Doc Delete?

Hi all. I have a database, based on the R5 Mail template, on a 5.0.8 Domino box. I would like to set up an agent that triggers an email to be sent to myself whenever a document (calendar entry, to be specific) is DELETED from the database. Using the basic agent setup (View>Agents, etc) I can get this to run when a document is created or edited, but there seems to be no easy way get reports of deletions. If possible, I would like this email to include a copy of the document that has been deleted.

Can anyone help me with some lotusscript or other means to bring this functionality about?

TIA
G
Avatar of HemanthaKumar
HemanthaKumar

QueryDocumentDelete.. is the event to concentrate. This is available in database script.

Here use the "DOCUMENTS" property and send them to your id ...

eg;

dim col as NotesDocumentCollection
set col = Source.Documents
dim doc as NotesDocument
set doc = col.GetFirstDocument
while not doc is nothing
doc.send true, "username@domain.com"
set doc = col.GetNextDocument(doc)
wend



~Hemanth
Avatar of gregkling

ASKER

I should have pointed out that I am NOT fluent in LotusScript and Domino Designer by a longshot....I can hack my way through with some general direction. (Don't worry, the database isn't mission-critical!)
Follow my sample code..

First you need designer , after openigng the db in designer.. objects are exposed. Look for Database Script object (others section)
ASKER CERTIFIED SOLUTION
Avatar of qwaletee
qwaletee

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial