CanInsertRecord Event

Description

This event fires before a new record is inserted.

Discussion

This event allows you to abort the insert if certain conditions have not been met.

The following variables are available to you in the event:

Variable
Description
Args

Contains the GridDefinition and rtc variables.

PageVariables

Contains the state info (__si2) object.

DataSubmitted

Contains the changes submitted for the record.

Your event must set the following variables:

Variable
Description
Result.Cancel

If .T., the insert record action will be cancelled.

Result.ErrorHTML

An HTML error message to display when the event is cancelled.