FieldEdit Event
Use FieldEdit PeopleCode to validate the contents of a field, supplementing standard system edits. If the data does not pass the validation, the PeopleCode program should display a message using the Error statement, which redisplays the page, displaying an error message and turning the field red.
To permit the field edit but alert the user to a possible problem, use a Warning statement instead of an Error statement. A Warning statement displays a warning dialog box with OK and Explain buttons. It permits field contents to be changed and continues processing as usual after the user clicks OK.
If the validation must check for consistency across page fields, then use SaveEdit PeopleCode instead of FieldEdit.
FieldEdit PeopleCode can be associated with record fields and component record fields. The FieldEdit event applies to the field and row that just changed. For a definition of what constitutes a field change, see Field Change Processing.