Problem with method GetEntryByKey

This agent in R5 works fine.

Dim session As New NotesSession

Dim db As NotesDatabase

Dim view As notesView

Dim VEntry As NotesViewEntry

Set db = session.CurrentDatabase

Set view = db.GetView(“NPK”)

Set VEntry = View.GetEntryByKey( “2004”, True)

If VEntry Is Nothing Then

Print | Entry not found |

Else

Print  VENtry.ColumnValues(0)

End If

But in R6.5 I get “Entry no found”.

User can’t see document but he can see category. I always use this technique to get same

values from documents, when user can’t see some documents.

I rather think that Lotus change something in class NotesViewEntry, but I can’t find any reference in Help or FixList databases.

Aigars

Subject: Problem with method GetEntryByKey

This works for me in the 6.5 and 5.0.11 clients in a categorised view using a category string as the key. When you say “User can’t see document but he can see category” do you mean that the entry in question is protected by a Readers field? If so, you will still see the category, but not the document. Without testing this I can’t be sure, but that may have an impact on whether the NotesViewEntry is fully initialised or not.

You say the code works fine in R5… given the above, is it possible that the code was running on different data / under different user privileges? Also, you require an unambiguous match with your “True” argument – could that be causing an issue? (e.g. stray spaces and the like).

Subject: why I can’t see my response? I has so loooong text

Subject: Problem with method GetEntryByKey (2nd try, cut)

do you mean that the entry in question is protected by a Readers field

Yes. Document is protected by a Readers field.

is it possible that the code was running on different data / under different user privileges?

No. I create 2 new databases (on R6.5 and R5). Only one form, one view and one agent and test it. On R5 all works fine but on R6.5 don’t.

I’m sure there is no problem with “Don’t show empty categories”

Subject: Also check the View property “Don’t show empty categories” is not checked on the 3rd tab.