’ * and redirects to a notes: URL, so the document gets opened in the Notes Client.
’ *
’ * The reason why this is needed is, that ‘notes:’ URLs only work with UNIDs.
’ * It is not possible to use a custom view and a custom key.
’ * (Although this would work with ‘html:’ URLs.)
’ */
Const title = "aaNotesOpen"
Dim cs As New CCallstack (title)
On Error Goto CATCH
Dim s As New NotesSession, query As String
query = s.DocumentContext.QUERY_STRING_DECODED(0)
Dim key As String, docAction As NotesDocument
key = getUrlParameter (query, "key", "")
If key<>"" Then
Set docAction = getNodeByKey (key) ' lookup the document
End If
If docAction Is Nothing Then
Print {<h1>ERROR: Invalid Key</h1>}
Print {<p>The action key '} & key & {' could not be found.</p>}
Else
' redirect to a notes: URL like
' notes://Devserver3@INTEGRAL/__C125729600594C81.nsf/0/B92BE8EB8A68AAD4C125734D00335ED1?OpenDocument
Print "[" & docAction.NotesURL & "]"
End If
Exit Sub
CATCH:
Call logException()
Exit Sub
End Sub
Note that this not very fast, since the client browser is involved, so if anybody has a better solution…