It may be a long time since the last comment and it may be not straight to the discussion, but I found this page while searching for problems with CopyToDatabase.
I have a database, where documents may get archived. I archived with CopyToDatabase. So far, everything went fine, since the original documents UNID was kept in a new document in the main database.
Now, for a new type of document, I wanted to keep the UNID to avoid updating other documents too. So after using CopyToDatabase I changed the UniversalID. What happenend is, that the document became doubled. Instead of archiving 1 document, it created 2, one with the CopyToDatabase, the other after changing the UNID. I changed to code, using CopyAllItems, and it worked as expected.
It may be a long time since the last comment and it may be not straight to the discussion, but I found this page while searching for problems with CopyToDatabase.
I have a database, where documents may get archived. I archived with CopyToDatabase. So far, everything went fine, since the original documents UNID was kept in a new document in the main database.
Now, for a new type of document, I wanted to keep the UNID to avoid updating other documents too. So after using CopyToDatabase I changed the UniversalID. What happenend is, that the document became doubled. Instead of archiving 1 document, it created 2, one with the CopyToDatabase, the other after changing the UNID. I changed to code, using CopyAllItems, and it worked as expected.