|
This morning, while training a few developers, I stumbled upon a piece of functionality I would've never thought existed in notes:
I was teaching the pro's and con's of using qualified vs relative vs dynamic urls, and made good mention of @WebDbName and it's benefits. In my example, I wanted to show how a url would look in order to "compose a form" when creating hotspots in Forms or Pages. Below is an example of how this could be done, from worst to best:
QUALIFIED URL = "http://www.domainname.com/ApplicationFolder/DatabaseName.nsf/FormAliasName?OpenForm"
RELATIVE URL = "/ApplicationFolder/DatabaseName.nsf/FormAliasName?OpenForm"
DYNAMIC URL = "/" + @WebDbName + "/FormAliasName?OpenForm"
When one of the developers asked me what would happen if just adding the "/FormAliasName?OpenForm", leaving out the beginning "/" and @WebDbName, I laughed and said that the url returned will be dodgy and incorrect. Been a person who believes in visually proving a point, I changed the code in my hotspot, and added the following url, "FormAliasName?OpenForm", not realizing that I accidentally left out the "/" before the "FormAliasName". Low and behold, the result was a fully qualified url where the domain, filepath and file name were dynamically generated by Notes itself, without any need of using @WebDbName.
BOTTOM LINE:
"FormAliasName?OpenForm" - WORKS and REPLACES "/" + @WebDbName + "/FormAliasName?OpenForm"
"/FormAliasName?OpenForm" - DOESN'T WORK
N.B. The Above example assumes that you are composing a Form on the current server, in the current database.
Cheers John
|
Ratings
0
|