OpenNTF.org - URL Redirector
My Links (Not logged in)
Code Bin Search
 
Hosted by Prominic.NET
Rate This Code
5 - brilliant stuff
4 - very nice
3 - average
2 - needs work
1 - bad
   OpenNTF Code Bin
About This Code
Brief Description:
URL Redirector 
Rating:
Not Rated Yet 
Contributor:
Grant R Lindsay 
Category:
Application 
Type:
Administration 
Notes Version:
R8.x 
Last Modified:
14 Sep 2010 
OpenNTF Disclaimer

All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.

Code / Description
Problem


SharePoint suppresses Notes URLs in some contexts (e.g., wiki pages.) For example, the page editor will simply turn this HTML source mark up:

<a href="notes://Server/Database/View/Document">My Notes Document</a>

Into this:

<a>My Notes Document</a>

Which creates a broken link. For organizations that are using a combination of Notes and SharePoint and that would like to reference, from within SharePoint pages, existing content stored in Notes applications, this presents a real problem. For example, in a SharePoint wiki, you may wish to refer the reader to a policy or procedure that already exists in a Notes application. The document in the Notes application my be the authoritative version, since the application has the required workflow, security, and version history. Simply copying the document's contents into the SharePoint wiki is not sufficient. You need to reference the document of record by a link that will always refer to the current, approved version.

There are a few ways to address this. You could rewrite the application in SharePoint and import all the data there. You could web-enable the Notes application and use "http://" URLs, which SharePoint will accept. These efforts may be prohibitively expensive, however. Fortunately, there is a solution that is not too difficult and will work across all such Notes applications.*

* It is possible that recent versions of SharePoint address this URL shortcoming and it may no longer be a problem. I don't know. Also, there may be other solutions that are as good as or better than this one. If you know of one, feel free to share it.

Background

Notes URLs begin with the protocol, "notes://..." and, when activated, instruct the browser to open the Notes client to an identified resource (e.g., a document, a view, etc.) Of course, this works if the local operating system and browser settings are configured correctly (i.e., the Notes client needs to be installed, the "notes" protocol needs to be registered to launch Notes, etc.) When these are set up, a link on a web page will launch Notes to the specified location.

For example, the Notes URL for a document might look like this:

Notes://Server/852573AD005B5248/8178B1C14B1E9B6B8524624F0062FE9F/16D8E964410908B98425767700620EE6

The format being:

Notes://Server_Name/Database_Replica_ID/View_UNID/Document_UNID

You may use either IDs or names in the URL. You can find the Notes URL of a document by opening its properties box from a view, clicking the "Meta" tab, and looking to the "Identifier" field.

If you are referencing a local resource, the server element would be blank, which looks like three slashes, instead of two:

Notes:///852573AD005B5258/8178B1C14B1E9B6B8525624F0062FE9F/16D8E964410908B98525767700620EE6

Solution

I created the attached simple redirect application that lets any SharePoint page authors use any URL, including Notes URLs, within SharePoint by redirecting from a regular HTTP URL, which is allowed in SharePoint.

We tested this on a Domino 8.5 server, but the technique should work on any Domino version that understands the ?ReadForm URL command.

Usage / Example
Deploy the attached Notes application to a Domino server that (1) has the HTTP task running and (2) is accessible to the users who will need the Notes content.

Edit the ACL to give yourself Manager access. Change the "-Default-" entry to "No Access."

Once the Notes application is deployed, all you need to do is replace your Notes URLs in the SharePoint document as follows. For example, this Notes URL, which opens a view in the target database:

notes://server/folder/database.nsf/C3DA49E2E710A814852572620047B3BD

becomes:

http://your.web.server/redirect.nsf/goto?ReadForm&rt=notes://server/folder/database.nsf/C3DA49E2E710A814852572620047B3BD

or, more generally:

http://your.web.server/redirect.nsf/goto?ReadForm&rt=your_URL_here

You will need to replace "your.web.server" with either the IP address or host name of the Domino server that hosts the redirect application. Also, ensure the path (here we used "/redirect.nsf") points to the redirect application on that server.

This technique can redirect any registered URL, not just Notes URLs; requires zero configuration; and stores no data.
Code Attachments
redirect.nsf (384 Kbytes)
 Comments

No documents found

 Add your comment!