HI, I have an embedded view on a Form A, and from there I compose Form B, whose documents should show in the embedded view. My problem is the first document created does not show up automatically on the view until F9 is hit. but subsequent documents show up automatically. Is there a way to refresh the view the first time around as well?
Thanks.
Subject: Embedded view Refresh problem
Hi payal !I had once the same problem and the solution i got was from this forum.
You will have to put this code in postsave event of the form B
Sub Postsave(Source As Notesuidocument)
keybd_event &h78,0,0,0 ' <F9> key down - to refresh view
keybd_event &h78,0,2,0 ' <F9> key up
End Sub
and in the declaration section of the form b you write
Declare Sub keybd_event Lib “user32.dll” (Byval bVk As Integer, Byval bScan As Integer, Byval dwFlags As Integer,Byval dwExtraInfo As Integer)
Hope it solves your problem
Manu
Subject: RE: Embedded view Refresh problem
Thanks Manu for your response. I tried to put your code in the postsave and also tried on QueryClose, but unfortunately it didn’t solve the issue. I guess when this script runs the focus is still on Form B and its Form A that needs to be refreshed. I’m not sure what else can be done, but any suggestions will be welcome.
Subject: RE: Embedded view Refresh problem
Hi Payal!Actually it is the compbination of settings that will give the desired result.In my case i had save the form a before composing form b.in form b in the declare section i put the code
Declare Sub keybd_event Lib “user32.dll” (Byval bVk As Integer, Byval bScan As Integer, Byval dwFlags As Integer,Byval dwExtraInfo As Integer)
and in the post save event the code
Sub Postsave(Source As Notesuidocument)
keybd_event &h78,0,0,0 ' <F9> key down - to refresh view
keybd_event &h78,0,2,0 ' <F9> key up
End Sub
But the form was closed with lotus script on the click of an action button that had code for “save and close”
and in the end uidoc.close was called
to close the form.
You try it probably this might solve as initially i too had problem but was successfull in the end.
Bye
Manu
Subject: It worked as an agent on @Command([ToolsRunMacro])
Hello,
Thank you for this code. I tried it exactly as you described, and when I returned to the parent document, the new child doc was still not displaying in the embedded view.
I went back to my formula action buttons on both the Parent doc (Create Comment) and the Child document (Save & Close).
I used your code to create an agent called "RefreshEmbeddedView’ and called it as follows in the Save & Close button of the child document:
@Command([FileSave]);
@Command([FileCloseWindow]);
@Command([ToolsRunMacro]; “RefreshEmbeddedView”)
Then it worked perfectly.
Thanks again,
gail
Subject: RE: Embedded view Refresh problem
THANK YOU!!! I’ve been looking for this answer FOREVER, nothing worked then I found your answer and it worked like a charm!!! Thanks!
Joni
Subject: THANKS! Embedded view Refresh problem
The code Manu posted worked fine for me just as he originally said. This was very helpful. Thanks!
I don’t know why we should have to jump through this hoop, but on 6.5 I certainly have to. Why creating a 2nd doc causes the first doc to appear in the embedded view anyone’s guess. This is clearly a bug in 6.5. I didn’t look through the 7.0+ docs t o see if it was fixed.