Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make automated notification using Lotus Script

I know that using Lotus Script you can make an notification (auto email), ONLY If you have some control that will be triggered manually (like a button etc etc..).

What I want is to trigger the notification automatically (with out human intervention). Let's say for example I have a lotus document that have a date field (value is TODAY), after 15 days I want the Lotus app to send a notification that the document is already 15 days old.

Thanks for any response!

like image 209
Bimbz Avatar asked Dec 14 '22 22:12

Bimbz


1 Answers

Create a LotusScript agent and schedule it for e.g. daily at 1:00

enter image description here

This agent will be executed at the certain time on server and you can accomplish all things you want to do without human intervention.

Set Target to "All documents in database". You can get all documents this way:

Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments
Set doc = collection.GetFirstDocument()
While Not(doc Is Nothing)
  ' test date field in doc and send message if date is older then 15 days
  Set doc = collection.GetNextDocument(doc)
Wend
like image 147
Knut Herrmann Avatar answered Jan 28 '23 04:01

Knut Herrmann