form is intially in read mode but when user click on a button"APPROVE" an input box is there in which user must enter comment .that comment must be set in COMMENT field and again that form must switch to read mode
Subject: Entire form is in read mode but i want to set one field
Hi,
I would use a dialog box for something like this. When the user clicks ‘Approve’ use something like the code below (obviously you need to create the dialog form which will pop on click - remember to name the field on this form needs to match that you want to update on the main form).
Code:
@Command( [EditDocument] );
@DialogBox(“form name”; [AUTOHORZFIT] : [AUTOVERTFIT] );
@Command([FileSave]);
@Command([EditDocument])
this places the form in edit mode, prompts for the value, saves the main document and returns to read mode.
Hope this helps.
Subject: Entire form is in read mode but i want to set one field
You can put following code to a LotusScript button:Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument
Set doc=uidoc.document
doc.Comment=Inputbox("Input your comment")
Call doc.save(True,False)
Call uidoc.close
Set uidoc=workspace.EditDocument( False, doc)
End Sub
User who clicks the button must of course have rights to save the document.
/Andrei