Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generate reminder using lotus script agent

Status
Not open for further replies.

breentha

Programmer
Nov 3, 2011
1
Dear all,


i would like to know how to generate reminder using lotus script agent. the reminder should be generated, lets say 48hours after the last processing date. How do i write the codes for this?


thanks,

Breentha
 
If you have no experience with LScript, it is going to take some time.

Your first step is going to be to have a view of all processed documents, sorted by processing date. Your script will need to iterate through that view, one document at a time. The code to do that will look like this :
Code:
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim olddoc As NotesDocument

Set db = session.currentdatabase
Set view = db.getview("viewname")
Set doc = view.GetFirstDocument
Do While Not(doc Is Nothing)
At this point, with your document you will need to check the last processing date, the status of the document and decide whether or not to send a notification. I cannot really give a code example for that without knowing a lot more about your document structure and your workflow.
After treating your document, you will need to iterate to the next document and wrap up treatment with something like this :
Code:
Set olddoc = doc
Set docdoc = view.GetNextDocument(olddoc)
Delete olddoc
Loop
Don't forget to save the document before going to the next one if you made any changes to its content.

Good luck !

Pascal.

I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top