Translation

Ads

Granjuxx
Professional IT services. Special offers for small companies Websites.
Hostnet
Hosting starting at R$9,90. Free domains. 30 days free trial.


Place your ad here.

Public audience report XHTML valid

Home

Social

Display a custom message box using a LotusScript-generated button PDF Print
User Rating: / 0
PoorBest 
Written by Bruno Grange   
Monday, 26 January 2009 10:11
This LotusScript will display custom messages after running code in the background for any Lotus Notes document/data processing, email, etc. The LotusScript code will also close the window automatically -- without requiring any additional clicks.

To display a customized message box, you first must create a button on any Lotus Notes form that will call another Messagebox or Dialogbox. Then write the following code in an on-click event.

To display a customized message box, you first must create a button on any Lotus Notes form that will call another Messagebox or Dialogbox. Then write the following code in an on-click event.

Note: This code can also be used in an agent, if needed.


Sub Click(Source As Button)
Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim db As NotesDatabase
Dim tempdoc As Notesdocument
Set db = session.currentdatabase
Set tempDoc = db.CreateDocument
Call workspace.DialogBox( "msgBoxCloseAuto",
True, True, True, True, False, False,
"MessageBox Closing",TempDoc, True,True )
End Sub

After writing the code, follow these steps:

  • Create another form called msgBoxCloseAuto.
  •  

  • Enable the option "Automatically refresh fields."
  •  

  • Create a button and place it in a table.
  •  

  • Write the message that you want to be displayed in the button text.
  •  

  • Write the following code on the Postrecalc event of the msgBoxCloseAuto form.

Sub Postrecalc(Source As Notesuidocument)
Sleep 3
source.close
End Sub

This will display the second form as a Messagebox or Dialogbox, depending on which you select, and will close automatically after three seconds.

Related Articles:
 

Add comment


Security code
Refresh