Controlling the startup database in Lotus Notes

I have used three methods (at different customers):

  1. Setting the StartupDb parameter in notes.ini
  2. Creating a new frameset in bookmark.nsf – and launch this (from database launch properties on the bookmark.nsf)
  3. Creating a script that adds the database to the ‘Startup’ bookmark group (found in your bookmark bar, under ‘More Bookmarks’ )

1. Set a startup database in notes.ini
replicaId = Left( db.ReplicaID, 8 ) & “:” & Right( db.ReplicaID, 8 )
Call session.SetEnvironmentVar( “StartupDb”, replicaId, True )

Comments: will open the database in a secondary tab. Will have focus when launched

2. Create a new frameset in bookmark.ntf (note – make the changes in the template file)

  • Create a new frameset with one frame. Let the frame show a link – and include a notes url to the database/frameset you will open
  • Set the launch settings to open the new frameset (in the database properties box)
  • Copy the new bookmark.ntf to all clients

Comments: will be the first tab (instead of the workspace) and can’t be closed by the user

3. Place the bookmark in the Startup folder (under ‘more bookmarks’) using Lotus Script:

Comments: Opens a secondary tab, but will not have focus and will not load before user activates. You can launch several databases in this way. My personal favorite.

Function setStartup( intranetdb As NotesDatabase )
Dim session As New NotesSession

Dim bookmarkDb As NotesDatabase
Set bookmarkDb = session.GetDatabase( “”, “bookmark.nsf” )

Dim outline As NotesOutline
Dim entry As NotesOutlineEntry
Set outline = bookmarkDb.GetOutline( “UserBookmarkOrder” )

‘find the “Startup” folder
Set entry = outline.GetFirst
Do Until entry.Label = “Startup”
Set entry = outline.GetNext( entry )
If entry Is Nothing Then Print “Can’t find the entry – operation stopped” : Exit Function
Loop

‘Startup folder found. First, delete all bookmarks in thhis folder
Dim nextentry As NotesOutlineEntry
While entry.HasChildren
Set nextentry = outline.GetNext( entry )
Call outline.RemoveEntry( nextentry )
Wend

‘Next, create a new bookmark in the folder
Dim bookmark As NotesOutlineEntry
Set bookmark = outline.CreateEntry( intranetDb.Title, entry, True, True )
Call bookmark.SetNoteLink( intranetdb )
bookmark.ImagesText = “$Icon”

Call outline.Save()

Print intranetdb.Title & ” added to the startup folder”
End Function

8 tanker om "Controlling the startup database in Lotus Notes"

  1. But you too must restart Lotus Notes Client for see the change?

    And Why you use the istruction “bookmark.ImagesText = “$Icon”?

    In my testing $Icon don’t load the image from intranetDB but from bookmark DB.
    It’s correct?

  2. Yes, the client must be restartet – this is the only way to update the UI (unless you do some kind of C api programming…)
    I use the “$Icon” to give the link a Icon; at this point it is the icon from the bookmark.nsf (I don’t know how I get the icon from the linked database…)

  3. hey, i am lookig to create a button to setup the startup dbs at users desktop. I am not a dev. can you give me a how..! possibily..!

  4. Hi Jakob! Thanks for the fantastic post, but I’m confused about the notes.ini process.

    The notes.ini just stores variables. However, you have a script? I have a DB that I want to open and have focus each time the user starts Lotus, but how do I declare THAT database. I didn’t even see how to declare WHICH database to open. I assumed it would be a path location to the NSF or something?

    Thanks so much!

  5. You need to add this line to the users Notes.ini file:
    StartupDb=replicaid

    You can get the replicaid from the Database properties (on the Info tab).

    I think you can use Policies to updates the users notes.ini file? Or you can send a mail to the users with a button:

    dim session as new notesSession
    Call session.SetEnvironmentVar( “StartupDb”, “your replica id”, True )

    But use policies if possible. (ask a Notes Administrator)

    Knowledgebase Link

  6. Thanks Jakob. I did that, but it didn’t work. The link you gave me showed the value being StartupDB. I didn’t capitalize the ‘B’. DOH!!

    Thanks for the link and the help! Good post.

Skriv et svar

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *

*