URGENT : settargetframe - help needed

Hi ,

Thanks for getting to this post.

The script below is triggered from a button on a notes client(6.5.1). It invokes a server process (usually runs for 5-10 secs) and then launches a document that was updated by that process. EVERYTHING works fine ALWAYS,unless the user shifts focus away from Lotus notes client.

After clicking the button ,if the user shifts focus to any other application on the desktop and comes back to notes client, the frameset context is lost and the document is open as a separate notes window.

I cannot use the autoframe property on the form, as the same document is opened from different frames.

Is there a way to prevent this from happening? OR Is there a way to find out whether the current document is open within a frameset?

If db.GetAgent(“RetrieveDetails”).RunOnServer(docRep.NoteID) = 0 Then

ws.SetTargetFrame("Frame1")	

ws.EditDocument True,vw.getDocumentByKey(ss.CommonUserName),,,False

End if

Any thoughts or suggestions?

Thanks much in advance,

Natesh…

Subject: URGENT : settargetframe - help needed

You need to use the openview method of NotesUiDatabase because the only commands you can run after setTargetFrame are:OpenFrameSet

OpenPage

OpenView

ComposeDocument

EditDocument

Try

If db.GetAgent(“RetrieveDetails”).RunOnServer(docRep.NoteID) = 0 Then

ws.SetTargetFrame(“Frame1”)

Set uidb=ws.CurrentDatabase

Call uidb.OpenView(“ViewName”, ,True)

ws.EditDocument True,vw.getDocumentByKey(ss.CommonUserName),False

End if

I haven’t Tested it but it is true for the formula laguage see

Show Search Bar In Framed Environment for more details

Subject: RE: URGENT : settargetframe - help needed

Hi Tim, This still doesn’t seem to fix the issue… What I am wondering is that the code I have works fine when the user doesn’t shift focus away from the notes client… any clue??

Thanks,

Natesh