Domino & Notes error

Database already contains a document with this ID (UNID)

Often seen when pasting documents, or from code that copies or creates documents.

What it means

A document was being added with a universal ID (UNID) that a document in this database already has. UNIDs must be unique within a database and are shared across its replicas.

Common causes

  • Pasting documents copied from another replica of the same database
  • Code that sets UniversalID to a value already in use, or copies a document twice
  • The matching document exists but is hidden from the view being used

Quick fixes

  1. Look the UNID up directly, for example with GetDocumentByUNID or a /0/[UNID] URL, to find the existing document
  2. Edit or delete the existing document instead of pasting a second copy
  3. In code, check for an existing document before saving and don't reuse UNIDs
  4. If the document exists but doesn't show, rebuild the views (Shift+F9, or updall -r on the server)

Need a hand with this?

Paste your exact message into What's That Error? for a plain-English explanation, or get in touch. I've been supporting Domino and Notes for 28 years.

Disclaimer

The errors, causes and fixes on this site are carefully researched, drawing on HCL documentation and 28 years of hands-on Domino and Notes experience. Every environment is different, though, and a solution that works in one may not be right for yours. Exact wording can also vary between Domino and Notes versions.

This information is general guidance only and is provided without warranty of any kind. Always back up your data and test changes on a non-production system first. To the extent permitted by law, Bruinsma Services Pty Ltd accepts no responsibility or liability for any loss, damage, downtime or other consequence arising from use of this information. For advice specific to your environment, please contact me.