@SetTargetFrame, Notesuiworkspace.ComposeDocument and inheritance

I have a document in a frame which has SaveOptions set to “0” (doc1)

I have a field RefNum on that document

I want to compose another document (doc2) in the same frame and for RefNum to be inherited by the new document.

using formuale…

If I use an action button on doc 1 with…

@Command([Compose];“”;“doc2”)

then doc is composed with the correct inheritance, but in a new window instead of the same frame.

If I use…

@SetTargetFrame(“TheFrame”);

@Command([Compose];“”;“doc2”) then the new doc2 opens in the correct frame, but RefNum is not inherited.

Any idea why the inheritance does not work for method 2?

using lotusscript… (NB I don’t want to save the document, as I want to give the user the option of cancelling it)

Set ws = New notesuiworkspace

Dim session As New notessession

Dim db As notesdatabase

Set db=session.CurrentDatabase



Dim doc As notesdocument

Set doc=db.createdocument



doc.Form = "doc2"

doc.RefNum = thisdoc.RefNum(0)

Call doc.ComputeWithForm(True,False)



Call ws.settargetframe("TheFrame")

Call ws.EditDocument( True , doc , False ,  , False, False )

This is even more strange. Instead of doc2 opening in the frame, a view which is embedded elsewhere in the frameset opens instead. I have verified that doc2 is indeed the correct document via debug. It works fine if doc2 gets saved.

If I use ws.Composedocument instead of ws.editdocument, the correct document is displayed, but with no inheritance as per the @formulae method

Subject: @SetTargetFrame and inheritance

You can do a couple of things- make sure that “doc2 form” properties are set to open in your frame- that should solve the issue for making if from the doc1 action button.

For doing it from an outline or other, take a look at @updateformula context -

Subject: RE: @SetTargetFrame and inheritance

Hi Thomas

setting the autoframe just causes the entire frameset to open in a new instance. The doc does appear in the correct frame though