The release of HCL Notes/Domino 12.0.1, a powerful new feature has been introduced for developers, the “GetNamedDocument” method in Notes Document Class.
This method gives access to a special type of document known as a Named Document.
Definition of Named Document:
– A named document is a special type of document in HCL Notes that is identified by a name rather than a NoteID.
– It does not appear in the Notes client UI or in any view, making it invisible to standard user interactions.
– Named documents are designed exclusively for programmatic access and serve as a functional replacement for profile documents, offering significantly fewer side effects and better performance in many scenarios.
Named Documents vs Profile Documents:
– While Profile Documents have been widely used for storing user-specific or configuration data, they come with a set of limitations—especially in web applications.
– A common issue with Profile Documents is that they are cached, which can lead to inconsistent behavior in web applications. Named Documents solve this by offering direct solution and ensuring data consistency across threads.
| Feature | Profile Document | Named Document |
|---|---|---|
| Visibility in UI | Hidden from users, but can appear in special views | Completely hidden |
| Caching | Yes – often leads to stale data in web apps | No – real-time access |
| Concurrency Handling | Poor in multi-user/threaded contexts | Better consistency |
| Introduced In | Earlier versions of Notes/Domino | Notes/Domino 12.0.1+ |
Usage of Named Documents benefits:
– Use this method while developing in Notes/Domino 12.0.1 or later version.
– Frequently read and update data programmatically.
– Avoid the side effects of Profile Document caching.
– Data is shared across multiple users or threads.
Usage Profile Documents:
– Storing static or rarely changed configuration data.
– Check the compatibility with Notes versions before 12.0.1.