NOTESSIDAN

Allt om Lotus Notes & Domino




Recieve daily email conflict reports
Use this script in a scheduled agent that runs every night. It will send you an email conflict report for each database with conflicts containing links to all the conflicts. Modify the script and add the databases you want a report for and who should recieve the reports
Sub Initialize

On Error GoTo e

Dim session As New NotesSession, db As NotesDatabase
Dim xdb As NotesDatabase,maildoc As NotesDocument, rt As NotesRichTextItem
Dim searchstring As String, dc As NotesDocumentCollection, tot As Long
Dim server As String, subj As String

Set db = session.currentdatabase
server = "domino1"

Dim dbs( 0 To 3 ) As String
dbs( 0 ) = "names.nsf"
dbs( 1 ) = "crm.nsf"
dbs( 2 ) = "invoice.nsf"
dbs( 3 ) = "intranet.nsf"

Set maildoc = db.Createdocument()
maildoc.Form = "Memo"
Set rt = maildoc.createrichtextitem("Body")
Call rt.Appendtext("Click here to open conflict database -> ")
Call rt.Appenddoclink(db,"Conflict db")
Call rt.Addnewline(2)

Dim recepients( 0 To 1 ) As String
recepients( 0 ) = "john.doe@acme.com"
recepients( 1 ) = "foo@acme.com"

ForAll sdb In dbs
Set xdb= session.GetDatabase(server,sdb)
Dim i As Integer, d As NotesDocument
searchString = "@IsAvailable($Conflict)"
Set dc = xdb.Search(searchstring,Nothing, 0)

tot = tot + dc.count
If subj = "" Then
subj = subj + xdb.Title + " (" + CStr(dc.Count) + ")"
Else
subj = subj + " / " + xdb.Title + " (" + CStr(dc.Count) + ")"
End If

Call rt.Addnewline(2)
Call rt.Appendtext(xdb.Title + " (" + CStr(dc.Count) + ")")
Call rt.Addnewline(2)
For i = 1 To dc.count
Set d = dc.getNthDocument(i)
Call rt.Appenddoclink(d,"Link")
Call rt.Appendtext(" - " + d.Form(0) + " - Last modified by: " + Implode(Evaluate(|@Name([CN];@Subset($UpdatedBy;-1))|,d)) + " at " + CStr(d.Lastmodified))
Call rt.Addnewline(1)
Next

End ForAll

maildoc.Subject = "Conflict Report - Total: " + CStr(tot) + " - " + subj
Call maildoc.Send(False,recepients)


Exit Sub
e:
Print Error,Erl
End Sub



Relevanta Poster på Notessidan:



Fler Poster om:

Fler bloggar om:

Technorati:

Delicious:
Publicerad 2014-05-22 | Kommentarer: 0 | Läsningar:

Kommentarer

No documents found



Sök på Notessidan
Thomas Adrian
ThomasCertifierad utvecklare och administratör inom Notes & Domino

Kontakta mig







Senaste Sökningarna på Notessidan
Sön - sharepoint (R:1)
Sön - räkna and antal and besökare (R:0)
Sön - browser (R:17)
Sön - stoppar and mail (R:1)
Sön - korrupt (R:3)
Sön - böcker (R:0)
Sön - kalendern (R:12)
Sön - feature (R:15)
Sön - print and mime (R:2)
Sön - länka (R:0)
Sön - databasen (R:94)
Sön - access (R:47)
Sön - outlook (R:15)
Sön - webanvändare (R:0)
Sön - google and maps (R:6)
Sön - juffe (R:2)
Sön - uidoc.print (R:1)
Sön - java and lotusscript (R:26)
Sön - besök (R:0)




Databasstatistik Blogg
Uppdateras var 15:e Minut

Antal Poster:562
Antal Kommentarer: 1025
Alla sidvisningar idag:
Unika Besökare idag:
Databasstorlek: 123,5Mb
Fixup: 2017-05-29 00:30:52
FT:2017-05-25 10:50:56
DB Procent använd: 97,7
Antal Agenter: 42
Antal Formulär: 65
Antal Vyer: 60
Antal Dokument: 6943
Antal Image Resources: 108
Antal Subformulär: 18
Antal Scriptbibliotek: 11
Totalt Antal Designelement: 573
Antal Attachments: 159
Antal Konflikter: 0
Server version 1: 405
Server version 2: Release 9.0.1FP8|February 23, 2017
Server Plattform: Windows/64
Ändrad: 2017-05-29 15:06:40
Server Tidszon: Z=-1$DO=1$DL=3 -1 1 10 -1 1$ZX=97$ZN=W. Europe
Region:
Kommentarsspam Idag: 0
Kommentarsspam Totalt: 8629


BlogRankers.com

Top Sites at iWEBTOOL.com

Fight Spam! Click Here!

Bloggtoppen.se

Listed on BlogShares

Increase website traffic

Top Internet Blogs

Site Checker