Skip to main content

Dynamic setting of urls in Domino

With a Domino .nsf file, occasionally you need to move a database from one server to another, but how do you keep your links intact when the new server has a new URL?

I have come up with 3 ways that I make use of that all return the same result. One is in formula language, one is in lotusscript and one in javascript.

Formula Language

[code]"https://" + @GetHTTPHeader("Host") + "/" + @ReplaceSubstring(@Subset(@DbName; -1); " " : ""; "+" : "/") + "/"[/code]

Lotusscript

[code]Dim Session As NotesSession
Dim dbase As NotesDatabase
Dim path As String
Set Session=New NotesSession
Set dbase=session.currentdatabase
path = "https://" & Strrightback(Strleftback(dbase.HttpURL, "/"), "/") & "/" & dbase.FilePath & "/"[/code]

Comments

Popular posts from this blog

Policies and Controls are King in the IT Security world

I came across an article by Roger Grimes over at Infoworld on how security policies and controls are the real power when it comes to IT security. Roger mentions the SANS 20 Critical Security Controls for Effective Cyber Defence , which are a great read for anyone looking at updating or auditing your policies for completeness. The SANS top 20 controls are a must for any organization: Inventory of Authorized and Unauthorized Devices Inventory of Authorized and Unauthorized Software Secure Configurations for Hardware and Software on Laptops, Workstations, and Servers Secure Configurations for Network Devices such as Firewalls, Routers, and Switches Boundary Defense Maintenance, Monitoring, and Analysis of Security Audit Logs Application Software Security Controlled Use of Administrative Privileges Controlled Access Based on the Need to Know Continuous Vulnerability Assessment and Remediation Account Monitoring and Control Malware Defenses Limitation and Control

Error 217 - Error creating product object on Domino 64 bit

I'd like to share something with you.   An error that you'll get if you are trying to use ODBC with Domino 8.5.1 64bit. It starts out with an agent error of Error 217.  The text of the error is "Error creating product object" You can read about it here on the Notes/Domino forum . You can find the solution here as well . I guess I'm now waiting for Domino 8.5.2 for a solution for this.   It would have been nice to have had this in the release notes.  It would have help me greatly.

Fun Little Earthquake

It's 1:45pm EST in Ottawa, Ontario, Canada. We just had an earthquake.  Not strong enough to damage anything, but enough that I watched people run out of buildings. What a fun Wednesday.