UNID & @Created

My post is in response to this one:http://www-10.lotus.com/ldd/nd6forum.nsf/ShowMyTopicsAllFlatweb/6eb4380ce8ed010f852572e400733f41?OpenDocument

I understand that when the CopyToDatabase function is used to copy a document from one database to another, the UNID from the parent doc is maintained on the new copy. I actually want the UNID to be CHANGED, but I’m unsure how to go about this. I really want the @Created date to be set to the current time, but it’s not since that’s derived from the UNID.

Subject: UNID & @Created

Have some LS that execute the following

set newdoc = copydb.CreateDocument

call newdoc.CopyAllItems(olddoc)

call newdoc.Save(True, False, True)

Subject: RE: UNID & @Created

Thanks so much Rob! That worked like a charm! Just one correction for the benefit of others who may use this code:

in the the line that calls the “CopyAllItems” method, use this instead:

call olddoc.CopyAllItems( newdoc )

The Notes documentation on this method isn’t very clear on that.

Rebecca

Subject: RE: UNID & @Created

Yes, you are absolutely right. and again the documentation is not very clear, I always have to read it twice to make sure I do it the way I want it and still get it wrong :wink: