HI All,
I am no stranger to LotusScript but here is my problem with db.GetDocumentbyUNID(unid)
I am getting the unid with the help of doc.UniversalID
and when i tried db.GetDocumentbyUNID it fails…
checked following things
-
I made sure unid is declared as a string…
-
created index on the database from which i am getting universalid but stil no luck…
-
with help of messageboxes and manual verification i made sure both the unid’s match
Is there anything changed with 6.5 ??
or
Is there anything else i need to check ??
Any help appreciated…
Thanks,
Durga
Subject: db.GetDocumentbyUNID fails… strange problem
What is failing, the GetdocumentbyUNID or trying to use the returned document?
If the you are getting errors when trying to process the returned document then you should try testing .isValid or .isDeleted because getdocumentbyunid can return deleted documents and handles to document you may not have access to (readers fields).
Subject: db.GetDocumentbyUNID fails… strange problem
hilike you can see in Designer Help:
“Not matching the UNID to a document in the database raises lsERR_NOTES_BAD_UNID (4091)”
May be catching that Error will help,
but I also recommend to create a View
with first sorted column
“@Text(@DocumentUniqueID)”
and work with getdocumentbykey so
you have a manual control too.