|
|
|
|
|
|
|
|
|
|
|
|
|
|
How to audit your address book: the design (continued)
While we were at it, we decided that anything that could be checked would be checked, a kind of deep audit of the address book Person records from the perspective of identification, addressing, and mailing. So that you don't get overwhelmed, the entire process has been broken up into two separate articles. But don't worry; you don't have to wait a whole month to read the rest. You'll find both articles in this issue of DominoPower!
How does the code help? What I did was to write a simple agent and put it in a separate database so that we could run it easily against different address books. It's a Run Once agent. The LotusScript is not the most finished and polished of code because it was created as a one-off for the exercise; speed of creation was the essence. At the end of the second article I'll make some suggestions as to how it could be altered or improved.
Let's look at the code The code starts in the normal way. You do add comments to your agents to help identify what they do, don't you? You can see where the name of the server and Domino Directory need to be specified.
Sub Initialize
'UALS November 2001: Check Notes directory for Person records with odd or non-standard values in important
'mail or personal identification fields.
'Reviewed and cosmetic changes made Aug 2002 for Dominopower Article.
'See comments below for code lines (marked <<<< in comments) to be changed to use in other situations.
Dim Db As New notesdatabase("server1/org","names.nsf") '<<< Identify the server/database to be checked
Dim users As notesview
Set users = db.getview("People")
Dim ServerView As NotesView
Set ServerView = DB.getview("($Servers)")
Dim ServerDoc As NotesDocument
Dim pers As notesdocument
|
This array of counts and severities enables us to count how many person records are dealt with and the maximum severity of problems on each. You'll see below what I mean by the three severities of problem.
Dim count(3) As Integer '0 is total, rest are severity
Dim sev(3) As Variant
|
We create a document for the report and set up for it to be sent as a mail memo. The ReplyTo field is set so that we're in control of any replies. Why would we do this? Well there was always the possibility in my mind that my original customer would run the agent as a scheduled agent, in which case the "From" field gets filled in with the name of the agent's signature, which might be a server. In such cases, any reply would go missing or dead somewhere; setting the ReplyTo field avoids this. Indeed, I make it a must that, in all cases where mail is sent programmatically, the ReplyTo field is always set to some appropriate value--the Administrator, for example. Why people would reply to such agent-generated mail is a mystery, but they do.
Dim ReportDoc As New NotesDocument(DB)
reportdoc.form = "Memo"
reportdoc.subject = "Address Book Checks on " & db.title
Dim ReportDocBody As New notesrichtextitem(ReportDoc, "Body")
reportdoc.sendto = "Mick Moignard@unipart" '<<<< Enter Notes email address of intended recipient of the report.
reportdoc.replyto = "Mick Moignard@unipart" '<<<< A value here means that ant accidental replies don't go to hyperspace
Here you can see the definitions of the severities.
Call reportdocbody.appendtext("Issues found in the " & db.title & " Notes Directory. Severity of items is marked (1), (2) or (3). ")
Call reportdocbody.addnewline(1)
Call reportdocbody.appendtext("Severity 1 items are those which impair the functionality of Notes, and should be corrected.")
Call reportdocbody.addnewline(1)
Call reportdocbody.appendtext("Severity 2 items are those which don't meet corporate policy.")
Call reportdocbody.addnewline(1)
Call reportdocbody.appendtext("Severity 3 items are benign - they have no deleterious effect, but may offer no value either. ")
Call reportdocbody.addnewline(1)
Call reportdocbody.addnewline(1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.
Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.
Learn how to easily clean up your address book. |
-- Advertisement --
Teamstudio Edition 25 has shipped
It's finally here! Now that Teamstudio Edition 25 has shipped, listen to our latest Tool Time audio program to find out what's changed. Updates to all your favorite Teamstudio tools will be discussed.
Plus, you'll get an introduction to Teamstudio Undo (formerly known as Teamstudio Snapper).
Tap here to get started! |
|
|
|
|
|
|
|
|
|
|