Document Close and Re-Open

When starting an agent from the form agent bar while a document is in read mode i run into following problems:

Scenario:

  1. The agent (lotus script) gets the document via ws.currentdocument

  2. the uidoc is closed

  3. some changes are done to the doc

  4. the document is reopen in the ws (read mode)

Problem:

field1 shows the changes correctly. Yet a second field, computed for display, which is dependant from field 1 does not display the new value (even if the formula only contains ‘field1’). After manually closing the doc and reopening it, the second field correctly displays the right values… strange…

After debugging i found out, that the closing of the uidoc (msgbox in queryclose) occurs after the reopening (msgbox in queryopen). No problem i thought, that is what the immediate parameter is for. I tried using the immediate parameter on closing the uidoc - uidoc.close(true). In this case, the uidoc seems to be open somewhere in the ‘back’ of the ws but is not displayed to the ws. I then was unable to open the doc ‘manually’ from the view. Only after restarting the notes client was i able to open the doc again…

Unfortunately, as far as i know, there is no reload/refresh functionality for read mode docs (instead of closing and reopening).

I’m at the end of my wits… any ideas out there?

btw: i searched the forum and support technotes: no hints found.

thx

Subject: Form Action instead of Agent

Try moving your LotusScript code from an Agent to a Form Action.

Subject: re: Document Close and Re-Open

We just had a business line convert from R6.5 to R8 Basic. This new “feature” in R8 that does not allow changes or refreshes of the document is a pain.

We use a @DialogBox to step through “rows” in a “table” on the form and because the document is in read mode… my navigation doesn’t work.

We navigate by changing a field (index or row number) on the read only form and then we refresh the fields. Neither of the two functions work.

I’ve tried switching my field to an environment variable but it still doesn’t work because R8 prevents the refresh of the form.

Any tips?