Domino Code Fragment

Code Name*
Directing New Users to a Special View
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.216.190.167
Description*
In R4.5 you can write a script that executes whenever a user opens the database. For example, you might want to direct new users to a special view, while letting old users proceed straight to the default view. To do this, write a script for the database object's Postopen event, as follows:
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
Sub Postopen(Source As Notesuidatabase)

Dim session As New NotesSession
Dim beenherebefore As String


beenherebefore = session.GetEnvironmentString( "$BeenHereBefore", True )
If ( beenherebefore = "" ) Then
Call source.OpenView( "NewUsers" )
Call session.SetEnvironmentVar( "$BeenHereBefore", "Yes" )
End If


End Sub