title: Programmatically change the value of a field without entering editmode and still refresh form
body: <p>In my Lotus Notes application (classic, not using XPages), the user won't be able to edit documents directly.</p>
  
  <p>Instead, modifications will happen dialog-based and triggered through actions on the form.</p>
  
  <p>For example, I have an action invoking code similar to the following:</p>
  
  <pre><code>Dim ws As New NotesUIWorkspace
  Dim result As String
  Dim document As NotesDocument
  Dim options(1 To 6) As String
  
  '... - Fill options
  
  Set document = ws.CurrentDocument.Document
  result = ws.Prompt(PROMPT_OKCANCELCOMBO, "New Value", "Please choose the new value", document.Foo(0), options)
  
  If result &lt;&gt; "" Then
      document.Foo = result
  
      Call document.ComputeWithForm(False, True)
      Call document.Save(True, False)
  End If
  </code></pre>
  
  <p>This updates the value of <code>Foo</code> to the value the user chose in the dialog.</p>
  
  <p>However, this new value is not shown to the user - the Form does not seem to be refreshed.<br>
  Reopening and closing the form does show the new value; it definitely gets updated.</p>
  
  <p>The nearest I could get was the following code (inside the if-block):</p>
  
  <pre><code>ws.CurrentDocument.EditMode = True
  document.Foo = result
  Call ws.CurrentDocument.Save()
  ws.CurrentDocument.EditMode = False
  </code></pre>
  
  <p>Nevertheless, this solution seems a bit suboptimal to me as I have to enter edit mode.</p>
  
  <p>How can I refresh the form using Notes Script to reflect the change of the field without having to enter edit-mode?<br>
  Methods like <code>ws.CurrentDocument.Refresh</code> either don't show any effect or raise errors as they can't be used outside edit-mode.</p>
  
  <p>Many thanks in advance for your ideas, tips and solutions!</p>