【发布时间】:2019-08-02 14:29:20
【问题描述】:
这种情况是否可以使用按钮以一种形式出现?
如果我创建新记录: 我的保存和关闭按钮将发送通知。
如果我编辑现有的现有记录: 我的保存和关闭按钮不会发送通知。
目前,我有 4 个按钮: 编辑、退出、保存和关闭。
当我点击新建时: 仅显示保存并关闭按钮。
当我打开现有的: 显示编辑和退出。然后当我点击编辑时,会出现保存并关闭。
**计划添加另一个保存和关闭按钮,我将在其中放置此代码。 然后只会在我处于创建新模式而不是编辑模式时显示。
Sub Click(Source As Button)
Dim ses As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim body As NotesRichtextItem
' get the database
Set db = ses.CurrentDatabase
' create a new document in the database
Set doc = New NotesDocument( db )
' set the new document's form so it'll be readable as a mail memo
doc.Form = "Memo"
' set the new document's subject
doc.Subject = "Notification"
' set the new document's body
Set body = New NotesRichtextitem( doc, "Body" )
Call body.AppendText( "A new record has been created." )
Call body.AddNewLine(1)
Call body.AppendText( "Click here to open the document --> " )
Call body.AppendDocLink( ws.CurrentDocument.document, "Click me" )
'Call doc.Send( False, "Lekhwair Alatan")
Dim recipients( 1 To 2 ) As String
recipients( 1 ) = "recipient 1"
recipients( 2 ) = "recipient 2"
Call doc.Send( True, recipients )
End Sub
【问题讨论】:
标签: lotus-notes lotus-domino lotusscript lotus lotus-formula