Yet another way to identify something in Notes
While working with the ASND Export Utility, I came across a new NotesSession method and 2 new properties that most data and design elements have. I have no idea how long they have been available, but like everything else in this world, I only found out about them when I needed a new way to do something.

The 2 new properties are more like 2 faces to the same thing. The HttpURL and NotesURL are the improved siblings of the UniversalID property. They both contain all the information you need to get to a particular document or design element, but the use different protocols to get there, namely http:// and notes://, respectively. The URLs generated for both properties use UNIDs instead of database and view names. The easiest way to get an idea of what they look like is to bring up the properties dialog for a document and click on the Meta tab. In case you don't know which one that is (I didn't), it's the one that is a plus sign (+) inside of angled brackets. The Identifier field at the bottom of the dialog is the NotesURL for that document.

Now, I know what you are thinking. What's the big deal if you already have hooks into the database and the view. The big deal is when these properties are used with the Resolve method of the NotesSession class. notessession.Resolve(NotesURL) will return a handle to whaever the NotesURL points to, whether it's a design element or a document. Imagine the generic subs and functions you can write if all you need the one little string to get a handle on whatever you need.

For me, this was important when returning a list of agents from a database. I didn't want to use the name of the agent, cause that could change over time. It was less likely that the NotesURL would change short of the agent getting cut and pasted back into the database. I have a feeling I will be using it these new features more and more in the near future.

<< Previous Document / Next Document >>
    Be the first in the world to comment on this entry!!!

Discussion for this entry is now closed.