Avatar of KTTKTT
KTTKTTFlag for United States of America

asked on 

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

Lotus IBM

Avatar of undefined
Last Comment
Sjef Bosman
Avatar of KTTKTT
KTTKTT
Flag of United States of America image

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of KTTKTT
KTTKTT
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of KTTKTT
KTTKTT
Flag of United States of America image

ASKER

Found new solution with further research.  Documented here.
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

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...
Lotus IBM
Lotus IBM

Lotus Software produced the Lotus 1-2-3 spreadsheet program, and later developed Lotus Notes, a groupware and email system. Following its acquisition by IBM, the Notes and Domino client/server collaborative platform were expanded to include functions such as email, calendars, to-do lists, contacts management, teamrooms, discussion forums, file sharing, microblogging, instant messaging, blogs, and user directories. IBM also release SmartSuite, a comprehensive office suite, and followed that with Symphony, unrelated to the Lotus suite of the same name.

21K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo