Change Web launch properties of a database

Change Web launch properties of a database

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.

    By submitting your registration information to SearchDomino.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchDomino.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

This was first published in April 2003

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.