Notes ND 6.5.1 problem report:DB Name: Catalog (5.0) File Name: catalog.nsf Template name: StdNotesCatalog
Notes Server version 6.5.1, Notes Client version 6.5.1
Issue: To browse a server directory with a web client in release ND6.5.1 access must be done via the new homepage.nsf database. In R5 with the proper setting in the server document you could browse the tree directly from the web client. You can you add a link hotspot(such as yyyy.com) to the catalog.nsf db on the homepage db into page. You will have these problems when using the link:
- Problem The URL will open the catalog.nsf db. After locating and opening a db document you will receive action buttons. (Database homepage.nsf, form Main, Open action button) The code for the Open action button for web is:
var form = document.forms[0];
if (form.Server.value != form.CurrentServer.value) {
alert ("Database is not on the current server and therefore cannot be opened");
}
else {
var pathname = window.location.pathname;
var path = pathname.substring(0,(pathname.lastIndexOf('.nsf')+5));
var url = path + "wOpenDatabase?OpenAgent";
url += "&SERVER=" + form.CurrentServer.value;
url += "&DATABASE=" + form.Pathname.value;
url += "&OPEN=" + window.location.protocol + "//" + window.location.host + "/" + form.Pathname.value + "?OpenDatabase";
window.location = url;
}
The CurrentServer field on the main form is: @Name([CN];@Subset(@DbName;1))
The Server field on the main form is: Server
Problem: the statement in the above code: if (form.Server.value != form.CurrentServer.value) {
alert ("Database is not on the current server and therefore cannot be opened");
}
will always fail because the CurrentServer uses CN format and Server uses heirarchial name format.
Solution: Set Server field to @Name([CN];Server).
- Problem: If a database in located in a directory the code above will not parse the Notes directory properly. For instance a directory name such as: Directory1\NotesDatabase.nsf will be parsed as Directory1NotesDatabase.nsf in the url code above.
Solution: Add new field to form Main:
Field WebPathName - @Text(Path := Pathname);
@If(@Contains(Path;“\”); @ReplaceSubstring(Path;“\”;“/”);“”) and change statement: url += “&OPEN=” + window.location.protocol + “//” + window.location.host + “/” + form.WebPathname.value + “?OpenDatabase”;
- Now you must update all docs in the catalog.nsf with and agent such as this (you will need to create the AllDocuments view, coping Database\by Category and changing the first column from Categorized sort to Standard).
Dim db As NotesDatabase
Dim view As NotesView
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Dim vc As NotesViewEntryCollection
Dim entry As NotesViewEntry
Dim update As Variant
Sub Initialize
Dim s As New NotesSession
Set db = s.CurrentDatabase
Set view = db.GetView("(AllDatabases)")
Set dc = db.AllDocuments
Set doc = dc.GetFirstDocument
count = dc.Count
For x = 1 To count
Print "Resetting Doc: " + x
update = doc.ComputeWithForm( False, False )
Call doc.Save(False,False)
Set doc = dc.GetNextDocument(doc)
Next
End Sub
Thought this might save someone a little time.
Tim