Hi, Is there anyway I can enable the unread mail count as I am using iNotes6 template. This is by default in Notes6, but not in iNotes6. If simple coding can do this trick, I would happy to test it out. Thanks!
Subject: Unread mail count in iNotes6
Hi,I made this by an agent.status field,and a view,
Here is the agent code:
Sub Initialize
On Error Goto Oops
Dim s As New NotesSession
Dim db As notesdatabase
Dim doc As NotesDocument
Dim CurrentDoc As NotesDocument
Dim InboxFolder As NotesView
Dim MailNumber As NotesView
Dim InboxCollection As NotesViewEntryCollection
Dim MailNoCollection As NotesViewEntryCollection
Dim MailEntry As NotesViewEntry
Dim c As Integer
Set db=s.CurrentDatabase
Set CurrentDoc = s.DocumentContext
'Set Initial value of mail counter(c)
c = 0
'Set The required view
Set InboxFolder = db.GetView("($Inbox)")
'Gets the corresponding view
Set InboxCollection = InboxFolder.AllEntries
'Begin Counting new mails
For i = 1 To InboxCollection.Count
Set MailEntry = InboxCollection.GetNthEntry(i)
Set doc = MailEntry.Document
'Counts number of new mails
If doc.isRead(0) = "" Or doc.isRead(0) = "0" Then c = c + 1
Next
CurrentDoc.Counter = c
Call CurrentDoc.Save(True,True)
Call s.close
Exit Sub
Oops:
status$ = "Error " & Err() & " at line " & Erl() & ": " & Error()
Print status$
End Sub
This agent searches on all documents and check if isRead field is set to “0” and counts the number of unread mails.
after all there is computed field in the home page that shows the number of unread mails.
This agent runs on WEBQueryOpen of the page you wish to show number of new mails.
Regards,