Has GetDocumentByUNID changed in ND6?

Has anyone experienced any changes in the performance of ‘GetDocumentByUNID’ in ND6 ?

It always used to be the case in R5 that if you fed the UNID of a deleted document to GetDocumentByUNID it would still be found - then you could use checks like IsValid or IsDeleted to ascertain whether you actually had a deletion stub or not.

I am finding at the moment that GetDocumentByUNID is producing the ‘Invalid Note ID’ exception when I feed GetDocumentByUNID the UNID of a Deleted Document that I KNOW is in the DB (I can see it in NotesPeek).

My code (which I don’t think is the issue) is below:-

Let DeletionStubUNID = rollback_Doc.rollback_OldValue(rollbackAuditID)

	Set DeletionStub = rollback_ProcessDB.GetDocumentByUNID(DeletionStubUNID)

…nothing too complicated I’m sure you’ll agree. The ‘DeletionStubUNID’ string is being populated correctly with the expected UNID.

If GetDocumentByUNID doesn’t return the Deletion Stub in ND6 does anyone know an alternative way to grab a handle to deleted documents ?

Many thanks.

Subject: Has GetDocumentByUNID changed in ND6 ?

I noticed the same thing. You can no longer get a handle on a deletion stub. I need this fuctionality to verify if a document has been deleted from a database, or if it was purged due to corruption, which shouldn’t leave a deletion stub.

Does anyone have any info on this issue?

Subject: RE: Has GetDocumentByUNID changed in ND6 ?

I know this is an old topic, but I thought I would post my solution in case it could help anyone else.

In my ($SoftDeletions) view, I made the first column of the view sorted with a formula of @Text(@DocumentUniqueID). This way, I could get the view by Set view = db.GetView(“Trash”) and then set the document I wished to undelete by calling Set doc = view.GetDocumentByKey(documentUNID)

This seems to work without issue.