Refresh (NotesUIDocument - LotusScript®)
Refreshes a document. When you refresh a document, its computed fields are recalculated.
Defined in
Syntax
Call notesUIDocument .Refresh( [ IncludeRichTextItems ] )
Parameters
IncludeRichTextItems
Boolean. Optional. Specify True to update all rich-text items in the back-end document to match the data in the front end. Defaults to False.
Usage
This method is valid only when the document is in Edit mode.
This method is useful when the value of a computed field depends upon the contents of another field in the document whose value may have changed, and you want to update the computed field. If you only need to update Hide When formulas, see RefreshHideFormulas.
This call is the same as if the user chooses View - Refresh.
This method also evaluates input validation formulas. If validation fails, the user sees a dialog box and the script raises an error. See On Error to handle the error. In your validation formula, you can use @IsDocBeingRecalculated to detect when the form is being refreshed and not raise an error.
The parameter is useful when you use Document and want to be sure the back-end document contains the most current front-end data including rich text. No method exists to get rich text changes from the back-end document into the front-end document. The user must close and reopen the document.
When you use NotesUIDocument.CurrentDocument, the resulting NotesDocument does not include changes made to rich text items since the editing session started. If this is a new document, the NotesDocument will not contain any rich text items. If you call Refresh with an IncludeRichTextItems argument of True, the NotesDocument will be updated with the latest contents of all rich text fields.