Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1746
  • Last Modified:

Refresh Embedded view on Parent when child response saves and closes without opening new parent window on newdoc

Hi, I have an embedded view of Response docs on Parent form that need to refresh.
1st problem: If the Parent is a New Doc, and once the response is created from the parent and saved/closed, I need the Embedded View to Refresh.
I found this code from this forum that refreshes embedded view if parent is new doc, but a second Parent Window is opened if the Parent is a new doc. Code is in queryclose event of child.
After closing Parent, I'm faced with having a 2nd Parent window to close.

2nd problem with using this code: From the view navigation, if you open a response doc, and after it closes, it re-opens the Parent, when I just need it to go back to the view navigation.

How do I modify this code to refresh embedded view on parent w/out the 2nd window opening.  If there is a better way, please explain with a workable example.   Thanks in advance for your help.  I researched this time and time again with no resolution.  High points for a working resolution.
' refresh parent EMBEDDED VIEW  by opening parent and refreshing.  The False is used to get handle on current parent window if open, otherwise open new window
	If Source.EditMode = True   And  Source.IsNewDoc = False Then		
		Dim session As New NotesSession
		Dim ws As New NotesUIWorkspace
		Dim db As NotesDatabase
		Dim doc As NotesDocument
		Dim uiDoc As NotesUIDocument
		Set db = session.CurrentDatabase
		Set doc = db.GetDocumentByUNID(Source.Document.ParentDocumentUNID)   ' get invalid unique id error
		Set currentDoc = Source.Document
		Set uiDoc = ws.EditDocument(True, doc, False, "", False, False)   'The False is used to get handle on current parent window if open, otherwise open new window
		
		Call uiDoc.Refresh
	End If

Open in new window

0
KTTKTT
Asked:
KTTKTT
  • 3
1 Solution
 
KTTKTTAuthor Commented:
Forgot to mention that the Embedded view needs to show as a Single Category, which is reason it's probably not refreshing on first response entry.
0
 
KTTKTTAuthor Commented:
Found my own solution with further research:
http://www-10.lotus.com/ldd/nd6forum.nsf/0/09a2ea7810ba697c852575e0003a404c?OpenDocument

Posted by Erwin Heeren on 25.Jun.09 at 06:36 AM using a Web browser
Category: Domino DesignerRelease: 6.5.5Platform: Windows 2000

You can simulate F9 in your script. This can refresh the parent form from an embedded view action.

'Global Declaration
Declare Sub keybd_event Lib "user32.dll" (Byval bVk As Integer, Byval bScan As Integer, Byval dwFlags As Integer,Byval dwExtraInfo As Integer)

Sub F9

Const VK_F9 = &H78

Const KEYEVENTF_KEYDOWN = &H0
Const KEYEVENTF_KEYUP = &H2

'Press and release F9
keybd_event VK_F9, 0 , KEYEVENTF_KEYDOWN , 0
keybd_event VK_F9, 0 , KEYEVENTF_KEYUP , 0

End Sub

------------------Have to do a :  Call F9   .  I placed this in both my parent and response forms.  works great.  Bless this programmer
Posted by Erwin Heeren on 25.Jun.09 at 06:36 AM using a Web browser
Category: Domino DesignerRelease: 6.5.5Platform: Windows 2000
0
 
KTTKTTAuthor Commented:
Found new solution with further research.  Documented here.
0
 
Sjef BosmanGroupware ConsultantCommented:
Here's a much older link that points to a much more complete solution:
http://benpoole.com/bp.nsf/weblog/200208202155

By the way, I hope you don't have to develop this for Linux or Mac clients...
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now