1

I use the following code to make sure I go back to a particular view when closing a document and select the newly created document:

Dim ws As New NotesUIWorkspace
Dim uidb As NotesUIDatabase
Set uidb = ws.CurrentDatabase
Call uidb.OpenView("vwMyView", , False)

ws.CurrentView.SelectDocument(Source.Document)

If the view is already open then this code will go to the view defined above and select the document. Accordingly if the view is not open, it will open the view and select our document. This is useful when a new document is created and the view index has not yet been updated.

This code works great, but how do I get this code to work, if I have the view as a part of a frame-set which is also set to be the home-page (home tab).

Edited:

Just to explain the issue further, I have a frameset which links to multiple databases, when a user clicks on the outline control to open a link, it opens a view within the frameset. Then when a new document (which belongs to another database compared to where the outline is) is created from this view, we open a new window outside of this frameset. On closing this document, I want to go back to the frameset (which is now in another database compared to this document) and refresh the view to select current newly document in view. This frameset is the Home page in my case.

pipalia
  • 911
  • 1
  • 12
  • 46

2 Answers2

2

Check whether SetTargetFrame can do something for you:

Call notesUIWorkspace.SetTargetFrame( frame$ )
D.Bugger
  • 2,300
  • 15
  • 19
  • Thanks for pointing out settargetframe, I also found opentargetframe whilst looking at the API, but how does this help what I am trying to achieve (please see the edited version of the question above). Would opentargetframeset work if the frameset is in another database and am I meant to supply the name/alias of the frameset as defined in designer or am I meant to provide it with the current window title during run-time? – pipalia May 08 '12 at 23:55
  • 1
    Why mention opentargetframe?? AFAIK SetTargetFrame selects the frame (by its name) where all future output will be produced. Maybe you also have to define a frameset with only a single frame, which exists in all framesets. The mail template has such framesets. – D.Bugger May 11 '12 at 21:10
1

Is the view set to auto frame into the frame set?

Martin Holland
  • 291
  • 1
  • 14
  • Thanks Martin, please refer to the above changed description, not sure if this will work in my case? – pipalia May 08 '12 at 23:56