NotesViewEntry document refresh problem --- LS

Hi,

Here’s the situation:

I have a NotesViewEntryCollection object name “vec”.

Then I did the following:

Set entry = vec.GetFirstEntry

Set vcdoc = entry.Document

I have the ‘entry’ in a loop so I can make changes to the documents. The documents save fine, but the values does not appear on the form unless I manually refresh it.

I tried vec.UpdateAll and setting the “Automatically refreshes fields” in the form properties, but both doesn’t work. Also, there is no vcdoc.Refresh or vcdoc.Reload.

Call workspace.ViewRefresh works fine by refreshing the view. But, I need the forms to refresh upon saving. Any help is much appreciated.

Thanks,

Amy

PS. searched the forum already. No help.

Subject: NotesViewEntry document refresh problem — LS

I don’t know what you are trying with that code in de form, but a lot of people have de same problem when use embedded view and after doing some operation with the documents in the view, wanted refresh the form(actual document), the client crash.

If you call uidoc.Refresh the client crash.

I don’t know Which lotus version are you using, try with 6.5.4, is an advice that some advised me.

I work with lotus 6.5.1 and have had a a lot of problems with the embedded view, I hope you found the solution.

Subject: RE: NotesViewEntry document refresh problem — LS

Thanks for the reply.

I use workspace.ViewRefresh to refresh the current view, which works fine. My problem is that I need to find a way to refresh document in NotesViewEntry.

Subject: RE: NotesViewEntry document refresh problem — LS

What you mean is that when you call workspace.ViewRefresh,

the uiview refres, but the values in the documents don’t refresh… ??

Subject: RE: NotesViewEntry document refresh problem — LS

Yes.

In order for the values in the forms to be updated, I have to go into the form and hit F9 and save it.

Subject: RE: NotesViewEntry document refresh problem — LS

I andertand you,

In order you coud update the values in the form you woud must do the following:

Set uidoc = workspace.Currentdocument

Call uidoc.gotofield (“un field in the form”)

Call uidoc.Refresh

at final of you code in the view.

Be carefull, because, The client mabe will crash.

Good lock

Subject: RE: NotesViewEntry document refresh problem — LS

I tried what you said, still didn’t work.gotofield is only useful when the document is in editMode.

What I have is an open document set it equal to workspace.CurrentDocument. Then, I took a field value from the document as a key in

Set vec = view.GetAllEntriesByKey(key(0), True), which give me a few documents. Then I have a loop to look through each document. If any document match the criteria I set, I’ll set the ‘APPROVED’ field in the document to ‘TRUE’.

It should always have 2 documents set to ‘True’.

The first document, which is the currentDocument is set alright. But the second document is not. I have to open the document and do a manual refresh before the ‘True’ shows up and I have to save it then to keep the ‘True’ visible.

Subject: NotesViewEntry document refresh problem - it WORKED

I put

uidoc.refresh

uidoc.save

in the PostOpen of the form, and it worked.

Thanks for all your help. I really appreciated.

Thanks,

Amy