Reminder Agent

Posted on 1999-10-26
Medium Priority
Last Modified: 2013-12-18
How to send a reminder email thru schedule agent to managers
if records has outstanding for more then 2 days.
Question by:jiayiloo
  • 3

Expert Comment

ID: 2158643
Two possibilities :

1 - Create an agent scanning the DB documents, searching by field the "last modification date" field, date before the last two days. (this field exists by default in documents)

2 - Create a "workflow history" field that records the last modification date

Then make the agent searching in this field, date before the last two days

Author Comment

ID: 2158675
I have a Date_Create field that capture the document creation date. Can you give some sample of agent formula/script program that can do verification on the date whether it is 2 days old or more.

Pls elaborate on possibility 2.

Which way is easier / better.

Thks in advance.

Author Comment

ID: 2161108
Need sample agent code

Accepted Solution

6924 earned 200 total points
ID: 2162668
You might try the following script. in a scheduled agent .  I used "on schedule daily" against "All documents in database"

1.  You will need to change the Const Mgr value to the name of the manager whom you want to send a notification to.  
2.  I am looking at a field called ChgStatus - and sending this notification only if the status has not changed in 2 days since creation.  You may not want this criteria at all - if not, you can delete that part of the query
3.  You need to change the form name on the line "Set collection=dbSearch....  to be the name of the form you are working with
4.  Change the text of the memo as you wish.

Hope this helps.

Sub Initialize
    Const Mgr = "Enter the name to be mailed to here"
     Dim Session As New NotesSession
     Dim db As NotesDatabase
     Dim collection As NotesDocumentCollection
     Dim dt As New NotesDateTime("1/1/99")
     Dim newdoc As NotesDocument
     Dim view As NotesView
     Dim reviewerdoc As NotesDocument
     Dim reviewer As String
     Dim rtitem As NotesRichTextItem
     Dim linkdoc As NotesDocument
     Dim linksummary As String
     Set db=session.CurrentDatabase
     Set collection = db.Search("Form = ""Computer System Request Form"" & ChgStatus = ""New"" & @Adjust(@Today;0;0;-2;0;0;0) > @Modified", dt, 0)    
     If collection.count = 0 Then
          Exit Sub
     End If
     Set newdoc = New NotesDocument(db)
     newdoc.Form = "Memo"

     newdoc.SendTo = Mgr
     newdoc.Subject = "Document outstanding for more than 2 days"
     Set rtitem = New NotesRichTextItem(newdoc,"Body")
     Call rtitem.AppendText("The following linked documents were created more than 2 days ago and require your attention!")
     Call rtitem.AddNewLine(2)
     For x = 1 To collection.count
          Set linkdoc = collection.GetNthDocument(x)
          linksummary = linkdoc.ChgSummary(0)
          Call rtitem.AppendDocLink(linkdoc,"")
          Call rtitem.AddTab(1)
          Call rtitem.AppendText(linksummary)
          Call rtitem.AddNewLine(1)
     Call newdoc.Send(False)
End Sub

Author Comment

ID: 2165134
Excellent Thks...

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying 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

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
There may be issues when you are trying to access Outlook or send & receive emails or due to Outlook crash which leads to corrupt or damaged PST file. To eliminate the corruption from your PST file, you need to repair the corrupt Outlook PST file. U…
Suggested Courses

592 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