如何使用Lotus Script进行自动通知

时间:2021-12-08 00:14:36

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..).

我知道使用Lotus Script你可以发出通知(自动发送电子邮件),只有你有一些手动触发的控件(如按钮等等)。

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.

我想要的是自动触发通知(没有人为干预)。比如说我有一个带有日期字段的Lotus文档(值是TODAY),15天后我希望Lotus应用程序发送文件已经15天的通知。

Thanks for any response!

谢谢你的回复!

1 个解决方案

#1


11  

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

创建一个LotusScript代理并为其安排例如每天凌晨1点

如何使用Lotus Script进行自动通知

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:

将Target设置为“数据库中的所有文档”。您可以通过这种方式获取所有文档:

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

#1


11  

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

创建一个LotusScript代理并为其安排例如每天凌晨1点

如何使用Lotus Script进行自动通知

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:

将Target设置为“数据库中的所有文档”。您可以通过这种方式获取所有文档:

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