Peter Cong 28.Nov.17 09:44 AM a Web browser Domino Designer All Releases All Platforms
How to refresh parent UI document when response document is opening from embedded view?
In my Notes application, th parent document contains an embedded view with some response documents.
there are some computed for display fields on the parent document which calcalted after the its response document opened
and edited or deleted. I need these fields to be refrfeshed to reflact any changes from its response documents.
So basically, this is what happened:
1. The parent document (with an embedded view ) is opened from the database, (some computed and computed for display fields of parent document calculated from
its response documents )
2. I select one document from the embedded view by double clicking it.
3. I delete or edit this response document and close it.
4. Those computed and computed for display fields are still showing the old data as the response document undeleted.
5. Press F9 key, those computed and computed for display fields are calculated properly.
So ideally, I need to include the F9 key press action included in the action of editing or deleting the response document without user press F9 key manually.
I have tried to use Virtual key codes to in the form event. Basically, declared
Declare Sub keybd_event Lib "user32.dll" (Byval bVk As Integer, Byval bScan As Integer, Byval dwFlags As Integer,Byval dwExtraInfo As Integer)
keybd_event &h78,0,0,0 '<F9> down
keybd_event &h78,0,2,0 '<F9> key up in the queryclose event of response form.
But the problem is that when user double clicking the entry on the embedded view, the cursor is selected on the embedded view, so the embedded view is refreshed, but not these
computed fields which are outside of embedded view.
I need to find a way to remove the cursor from the selected embedded view in order to refresh the entire parent form.
I tried to use
keybd_event &h1B,0,0,0 '<ESC> key on the queryopen event of response, but this does not work.
Can anybody help me to resolve my issue?
Thanks a lot in advance.