• Example of button for Workflow with a document in read mode.

    By Enio Basso 2 decades ago

    Example of button for Workflow with a document in read mode.



    Sub Click(Source As Button)

    Dim workspace As New NotesUIWorkspace<br/>
    Dim uidoc As NotesUIDocument<br/>
    Dim doc As NotesDocument<br/>
    Set uidoc = workspace.CurrentDocument<br/>
    Set doc = uidoc.Document<br/>
    <br/>
     'Turn on EditMode<br/>
    uidoc.EditMode = True<br/>
    doc.rwfDocStatus = &quot;Approved&quot;<br/>
    doc.rwfHasChanged = &quot;new status&quot;<br/>
    'Call doc.Save(True,False)<br/>
    uidoc.Save<br/>
    uidoc.close<br/>
    

    End Sub

    • Edit mode needed?

      By Ken Hawkins 2 decades ago

      If the document doesn't need to be recalculated, why change to edit mode? Since you're accessing the backend items of the document, edit mode (and saving the uidoc) wouldn't be necessary. This should also help performance since don't do a mode change and/or recalculate the document.



      Just my $.02