< Back

Document Subject: View name in URL irrelevant if using document unid
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#URLViewNameIrrelevant or http://A555F9/nn.nsf/ByAlias/URLViewNameIrrelevant

When specifiying a url for a document using a document's universal id (aka unid or @text(@documentuniqueid) or universalid ) the view name does not have to be correct.




Consider the url for this document:

 

http://www.notesninjas.com/A555F9/nn.nsf/501e3dcf1966be1986256f42003d15df/35c2654726c2a930802570af00402664

 The 501e...5df bit is the view name and if you use the view name it works as well.

http://www.notesninjas.com/A555F9/nn.nsf/Hints_By_Title/35c2654726c2a930802570af00402664

You can actually put anything in there and it will work.

http://www.notesninjas.com/A555F9/nn.nsf/rubbish/35c2654726c2a930802570af00402664

Best practice is to put in the view name in the text format, as then the user can go back to the view and find other documents etc which could be useful if the link fails etc.

 

I have also seen $DefaultView used, and of course to shorten a URL you could just use a single letter etc.

http://www.notesninjas.com/A555F9/nn.nsf/v/35c2654726c2a930802570af00402664

 

I presume it is an optimisation by the programmer: if the unid is valid and the user has access then just open the document, there is no reason to open or check the view first.

Could be considered a security risk, ie keyword documents or user's registration documents could be accessed but if you want to hide a document, just put proper security on it using reader's fields!