Have you ever wanted to change a databases' Web launch properties from a browser or just from a LotusScript agent?
Well here is an easy to use LotusScript agent that allows you to do this.
You would call this agent via a link in your web page or a button. You could also create an agent to run on the last day of the month at mid night to change the web launch page to an appropriate page for the new month.
This is a simple script and can be modified to allow the Web user to change the Web launch option to any page that is in the database by passing in a query string.
For exapmple:
http://www.mysite.com/db.nsf/weblaunch?openagent&page=hello
Dim session As New NotesSession
Dim db As NotesDatabase
Dim docIcon As NotesDocument
Dim path As Variant
Set db = session.CurrentDatabase
Set docIcon = db.GetDocumentByID
("FFFF0010")
docIcon.~$DefaultWebLaunchPage
= "construction.html"
docIcon.~$Flags = docIcon.~
$Flags(0) & "F"
Call docIcon.Save(True, False)
path = Evaluate(|@LowerCase
("/"+@ReplaceSubstring(@Subset
(@DbName;-1);"";"/"))|,docIcon)
Print"["+path(0) + "/mypage?openpage]"
end sub
Requires Free Membership to View
Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.
This was first published in April 2003