?
Solved

Agent/Script to run on Doc Delete?

Posted on 2004-09-09
4
Medium Priority
?
241 Views
Last Modified: 2013-11-16
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
0
Comment
Question by:gregkling
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12020890
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
0
 

Author Comment

by:gregkling
ID: 12021251
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!)
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12021341
Follow my sample code..

First you need designer , after openigng the db in designer.. objects are exposed. Look for Database Script object (others section)
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 2000 total points
ID: 12026746
Hi gregkling,

Is this based on the standard mail template?  The mail template already has a (somewhat complex) QueryDocumentDelete script.  Look for the lines:
                If Not (vbeObject.RepeatModify = -1) Then ' SPR #MBRT4FNV9E
                    Call notePlaceHolder.Remove(False)
                End If

That is the point at which the calendar entry gets finished processing.  I would put, ABOVE the IF NOT... line, the following code:

Dim logCalendarDeleteDatabase as New NotesDatabase ("your server" , "a new database that you will create to hold deleted calendar entries.nsf")
notePlaceHolder.copyToDatabase logCalendarDeleteDatabase

Now, you can go into the new database, and look for entries that users have deleted.  You can also build simple views that sort on date deleted or user name.

Best regards,
qwaletee
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question