Manage Learn to apply best practices and optimize your operations.

Validating A Richtext Field Before Saving The Document

This script can be used to validate a richtext field. The validation will be
fired only if there are no attachments and as well as no text.
Write this scrip in the QuerySave event of the form


'Body is the name of the Rich Text field
On Error Goto ErrSub

Call source.GoToField("Body")
Call source.SelectAll
Call source.copy
Call source.DeselectAll
Goto OkExit

'This error number will be generated when you
'try to copy the content of the empty field

ErrSub:
If Err = 4407 Then
Continue=False
Msgbox "Please enter values for the body field",48,"Error"
Exit Sub
End If
Resume OkExit
OkExit:

Dig Deeper on Domino Resources - Part 4

SearchWindowsServer
Search400
  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

SearchDataCenter
SearchContentManagement
Close