Link to home
Start Free TrialLog in
Avatar of wildbrookmedia
wildbrookmediaFlag for United States of America

asked on

Need to link to Document: Getting a documents UNID without using code...

We have a wiki at work and I need to link from the wiki to a notes document in a database.  I cant modify the notes database to have a view that displays all the documents with their unique ids...

This syntax works to link to a database and open it up:

[DatabaseLinkText|notes://ServerName/dbName.nsf]

According to Notes help, in theory, this should work but I dont have a good way to get a docs UNID
[DatabaseLinkText|notes://ServerName/dbName.nsf/View/UNID?OpenDocument]

Is this whole number the UNID?:
http://img253.imageshack.us/img253/4712/unidmd6.jpg
Avatar of SysExpert
SysExpert
Flag of Israel image

In Notes 6 and higher, the notes:// URL of a database, view, form, or document can be determined using the NotesURL property of the element when it's accessed in LotusScript as a NotesDatabase, NotesView, NotesForm, or NotesDocument. If you want to construct a notes:// URL manually, it's of the structure:
    * notes://servername/databaseName?OpenDatabase or notes://servername/__dbReplicaID?OpenDatabase for a database
    * notes://servername/databaseName/viewName?OpenView or notes://servername/__dbReplicaID/viewUNID?OpenView for a view
    * notes://servername/databaseName/formName?OpenForm or notes://servername/__dbReplicaID/formUNID?OpenForm for a form
    * notes://servername/databaseName/0/documentUNID?OpenDocument or notes://servername/__dbReplicaID/0/documentUNID?OpenDocument for a document

notes://pcf-door-03/852567940061C94A/Documentation/Policy     works OK

notes://pcf-door-03/852567940061C94A/C073697A19CEA8AD8525679A00414E50   - No Hex separators !

I hope this helps !

You can easily get the DOc info by right clicking on the DOc in Notes and choosing copy DOc link, and paste it into a TEXT editor ( Notepad ).


I hope this helps !
Avatar of wildbrookmedia

ASKER

I tried copying the doc info as you suggested in your second post and created the link, using the Note text as the link, both with and without the dashes and colons and it gives me the error:

"The document specified by the link cannot be located within the linked-to database."

mylink:
[Link|notes://Server/myDB.nsf/0/OF00A98E0ABB934524ON652570A5002BC6A3?OpenDocument]

info from 'copy as document link' operation:

myDB - Untitled
<NDL>
<REPLICA 882571B5:0071FF96>
<VIEW OF8D1697C1:F1AF9033-ON882572FB:0056798A>
<NOTE OF00A98E0A:BB934524-ON652570A5:002BC6A3>
<HINT>CN=Server/OU=myCO/O=CompanyName</HINT>
<REM>myDB</REM>
</NDL>
Why do you need the /0/ after mydb.nsf ?

try

notes://Server/myDB.nsf/OF00A98E0ABB934524ON652570A5002BC6A3?OpenDocument

Thought that the zero was for the view; zero meaning that it wasn't to look in a particular view, and to just go by the docs UNID...

Removing the zero still doesn't work. (with and without the colons, dashes etc..)

 do the dashes need to be represented with the %20 markup?

also your DOc ID is too long, missing a slash and the O and ON can also be removed

notes://Server/myDB.nsf/F00A98E0ABB934524652570A5002BC6A3?OpenDocument]

Which slash was i missing?

Still no go, same error.  The wiki software we are using is Confluence and you could try the markup, linking to a doc in one of your Notes dbs  in their test space here if you like: http://confluence.atlassian.com/display/TEST/Home
ASKER CERTIFIED SOLUTION
Avatar of SysExpert
SysExpert
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
B-E-A-UTIFUL!  Worked, thanks a lot!  So the moral of the story is to omit the 'OF' and 'ON' from the Note part of the link as well as all the colons and dashes.
Pretty much.

Glad this worked !
Avatar of qwaletee
qwaletee

I have an easier way for you.  Little undocumented tip.

Open any view or document
Press control-L; Notes takes you to its "web browser address bar"
Press Alt-Down (or press the down arrow to the right of the addreess bar.  History opens up.
Press it again.  History closes, but....

INSTEAD OF leaving you with a blank address bar, Notes fills in the NOTES:// URL of whatever view or document you are currently in.  Just copy and paste, no piecing together at all!
nice, thanks for the tip!