When using the C++ API 2.01 with LN 6 LNDocument::GetResponses returns the wrong number of items in the returned array.
The fault occurrs is I delete responses previously created - the steps (1) to (3) below fail as described if I run towards LN6 but succeed with LN4 and LN5:
Create 10 response documents to a parent document (pParent).
Delete all 10 response documents.
LNDocumentArray aRespDocs;
pParent->GetResponses(&aRespDocs);
int iCount = aRespDocs.GetCount(); < iCount is set to 10)>
aRespDocs[1].Open(); <Throws exception “551 (Invalid or nonexistent document)”>
Does anyone know the cause of this problem?
Would upgrading th API solve the problem?
Any help would be highly appreciated.
Subject: C++ API 2.01 GetResponses() does not work with LN6
I’ve got the same problem with the C API.
We have to look at two things here.
-
The parent document contains an array of all its childs.
-
The child have a $REF to the parent.
The problem occurs in both ways. If you delete a child, the parent keeps a reference to a non-existent document. It is the same thing if you erase the parent. The child keeps an invalid ref.
You can solve the child problem by deleting the $REF item in the Note, but since there is no way to modify the array of the parent(the one containing the ref to the childs), we have a problem there.
Here’s an idea if you need a patch.
Instead of using the getResponses method, you could try using a formula returning all the responses.
This is clearly a Notes API bug!
Hope this help.
Subject: C++ API 2.01 GetResponses() does not work with LN6
Bjorn,
Release 2.01 of the C++ API was tested against Release 4.63 of Notes … quite some time ago! The design of forms and views has changed substantially since then. I’m afraid I can’t actually test this: I don’t have a C++ environment older than 2.1.
I would strongly urge that you test with Release 2.3 of the C++ API Toolkit. If THAT doesn’t solve the problem, then there’s a bug we need to know about.
Best of luck!
- - Steve Boylan
Notes & Domino C++ API Team
Subject: C++ API 2.3 does not work either
Unforunately an upgrade did not solve the problem.
I upgraded to release 2.3 and got the same error. Even though I delete all previously created response documents an array with invalid response documents is returned in GetResponses.
The fault also occurrs if I create the response documents with the Notes Client before deleting them over the C++ API.
Regards,
Björn