Edit just saved document in Lotusscript agent ( Agent in turns call from view action button )

HelloI am using Notes 7 and I would like to open./edit the just saved document in lotusscript agent, this agent is being called from views action button.

call reportdoc.save(1,0)

call ws.editdocument(false, reportdoc, false)

I am able to open document but instead of opening saved document it opens the first document of view, I am not sure what is causing problem here.

Subject: Edit just saved document in Lotusscript agent ( Agent in turns call from view action button )

Hi, the EditDocument method has the last parameter “NewInstance” as TRUE by default and thus it opens a new document.

Also you are not using the notesUIdocument object returned by that method but just calling it. Use that object to display it on the workspace.