HCL Domino Daily — Daily Technical Picks
A bilingual daily HCL Domino publication — fresh ecosystem news and technical deep-dives, every day.
Latest Posts
- DXL in XPages: It's createDxlExporter (not DXL), and Import Hinges on DocumentImportOption
In XPages you need to hand a document, or a whole view, to an external system as XML — or the reverse, feed a chunk of XML in and turn it into Notes documents. DXL (Domino XML) is Domino's native XML, and session has both directions built in: createDxlExporter() out, createDxlImporter() in. The first trap is the name — it's createDxlExporter, not the createDXLExporter (uppercase DXL) you'd instinctively type; wrong case and SSJS can't find the method. The second is on import: DocumentImportOption defaults to DXLIMPORTOPTION_CREATE (always create), so importing the same DXL twice makes two duplicate documents; for "update if it exists, create if not" you have to set REPLACE_ELSE_CREATE or UPDATE_ELSE_CREATE yourself. This covers export, import, that naming trap, and why you check the Log every time.
2026.11.22 - ViewEntryCollection in Java: stampAll to Bulk-Edit, FTSearch to Narrow, Set Ops to Combine
You get a batch of view-ordered document entries with view.getAllEntries() or getAllEntriesByKey(key), and now you need to do something to them: set one field to the same value across all of them, narrow the range with a full-text search, or subtract 'query B's results' from 'query A's'. The reflex is a loop — getDocument and save on each. But ViewEntryCollection has batch and set operations of its own: stampAll sets one field across the whole batch at once, FTSearch narrows the collection in place to the matches, and intersect/merge/subtract do set operations. This covers those three, getNthEntry by position, and the two edges of walking: turn the view's autoupdate off (or you hit 'Entry not found in index') and recycle each entry.
2026.11.21 - ACL in XPages: Check Access with queryAccess, Change It Only Through sessionAsSigner
Dealing with the ACL in XPages is usually two different jobs with different code. One is checking: is the logged-in user Editor or above, do they have a given role — to decide whether a button shows or a panel renders. That's just database.getCurrentAccessLevel(), queryAccess(name), and queryAccessRoles(name); no ACL object needed. The other is changing: an admin screen to adjust other people's access — that means getACL, edit, and save, but the web user is usually not a Manager and can't touch the ACL, so you go through sessionAsSigner to run as the design element's signer. This piece keeps the two apart: the access-checking shortcuts, comparing against the LEVEL constants, role gating, and why changing the ACL always routes through sessionAsSigner.
2026.11.20 - Changing the ACL in Java: Without save(), Your Changes Vanish When the Database Closes
In Java you change a database's ACL programmatically: bump someone to Editor, enable a role for them, add a new entry. Every API call succeeds, nothing throws. Then you reopen the database and nothing changed. The reason is that ACL edits don't persist automatically — the docs say it plainly: if you don't call save before closing the database, the changes you made to its ACL are lost, with no warning. This covers getting the ACL, changing an entry's level, the fact that roles are two layers (define on the ACL, enable on the entry), the big save trap, and why you shouldn't mix Database.grantAccess with an ACL object you're holding.
2026.11.19 - QueryResultsProcessor in Java: Merge and Sort Results Across Databases into a View or JSON
You have document collections from three different databases, and you need them merged into one, sorted by the same field, a subtotal computed, and finally a chunk of JSON for the front end or a view to save. The hand-rolled way is to pull all three into memory, merge, and sort yourself — across databases, with any real volume, that doesn't hold up. QueryResultsProcessor (since R12) does it server-side: the docs put it as "Aggregates, computes, sorts, and formats collections of documents across any set of Domino databases." You feed in multiple sources with addCollection / addDominoQuery (each under a unique name), define the output columns and sorting with addColumn, then executeToView to materialize a results view that auto-expires, or executeToJSON to get JSON directly. This covers that many-in, one-out shape, the two output modes and their traps, and the create-method name (the one the docs get wrong).
2026.11.18 - NotesName in XPages: getCommonUserName Saves a Step, Comparing Still Needs Normalizing
In XPages, to show the logged-in user's name many people write session.createName(session.getUserName()).getCommon(). You don't have to — session has getCommonUserName() to get the common name in one step, and getUserNameObject() hands you a NotesName object directly. That's where XPages is more convenient than back-end Java. But one thing XPages can't skip: comparing user names, or using OU for conditional visibility (rendered), still hits the "same person, canonical and abbreviated aren't equal" trap, and you still have to createName and normalize both sides. This covers the session name shortcuts, comparing and checking OU correctly in XPages, and which form to use when writing a name into a Readers field.
2026.11.17 - Comparing Notes User Names in Java: Same Person, Not Equal? Normalize First
In Java you compare two Notes user names — the logged-in user from session.getUserName() and an approver stored in a document. Same person, yet string equals returns false. The reason: the same person's name takes different forms in different places — one is canonical, CN=John B Goode/O=Acme/C=US, another is abbreviated, John B Goode/Acme/US, another is just the common John B Goode. Compared as strings they're obviously unequal. The fix is to normalize both with session.createName to the same form (e.g. both getCanonical) and compare that. This covers the Name's three forms, comparing correctly, pulling a name apart into its components (OU, O, C) to decide whether someone is in a given org unit, and that it also parses RFC 821/822 internet addresses.
2026.11.16 - ViewEntry in XPages: Read the View with getColumnValues, Without Opening Each Document
In XPages you need to list a batch of data — a typeahead list, a chunk of JSON, a custom repeat. The columns you want to show are already laid out in some view. The reflex is to walk the view, getDocument on each row, and read the fields — but that opens every document, and a big view is slow. NotesViewEntry lets you read the index-level column values directly: getColumnValues returns each column's value for that row, and the whole walk can open zero documents. This covers getting a ViewEntry in XPages, reading column values, one confusing point (the collection from getAllEntries holds only document rows — category rows need a ViewNavigator), and that XPages, unlike Java, doesn't make you recycle.
2026.11.15 - ViewNavigator in Java: for Big Views, Turn Off autoupdate and Set CacheSize
A view with a few hundred thousand entries, and in Java you need to walk every row and do something. getAllDocuments pulls the whole batch into memory first and blows the heap on a big view. ViewNavigator is different — it walks the view's index one row at a time, handing you ViewEntry objects (index-level row data) without opening each Document. But to make it actually fast there are three knobs to turn yourself: set IsAutoUpdate to false (background auto-update degrades performance and can invalidate the navigator's entries), set CacheSize for remote operations to cut server round-trips, and use the goto methods instead of the get methods when you only need to move the pointer or count (the docs state plainly that a goto method does not create a ViewEntry object). This covers building the right navigation scope, those three performance knobs, and recycling each entry as you go.
2026.11.14