UniversalID (Document - Java)

Read-Write. The universal ID, which uniquely identifies a document across all replicas of a database. In character format, the universal ID is a 32-character combination of hexadecimal digits (0-9, A-F).

The universal ID is also known as the unique ID or UNID.

Defined in


Data type



public String getUniversalID()
    throws NotesException
public void setUniversalID(String unid)
    throws NotesException


If two documents in replica databases share the same universal ID, the documents are replicas.

If you modify the UNID of an existing document, it becomes a new document.

Saving a document with the same UNID as an existing document throws NotesError.NOTES_MIN_ERROR_CODE (4000).

See DocumentUniqueID for another way to get the Universal ID of a document and more information.