How a SmartNSF custom route can be used to create a redirector, in my case to open the corresponding Notes-document
I am – to nobody’s surprise – a big fan of SmartNSF. Here the other day I had to come up with a solution to make a web-URL redirect to a Notes-URL (you know, notes://…) and thus open a document in the Notes client. Why? A modernized Notes application surface it’s data on the web, but the users still needs to be able to see the real document in the Notes client. There are several ways to do this with traditional Notes development. However, I wanted to see how I can do this with a simple java class, all controlled by a SmartNSF custom rule.
For example, the URL http://someserver.com/DocumentDatabase.nsf/xsp/.xrest/doc_v1/5921-A4 will grab the document ID “5921-A4” and lookup the document behind the scenes, and grab the NotesURL such as Notes://SomeDominoServerName/C12573EF007A4D9D/B3612539371CB37AC125830D002A4BF9/67FD0734318B98A4C12582B900208F1F. The latter URL will normally open the specified document UNID in the Notes client, at least after you have confirmed security warnings like these;
How is it done?