onbeforeinsert |
This event is fired before business object(s) is inserted.
Syntax
DesignTime | This is a design-time property and can be set through the property sheet of the control. |
Event Information
To invoke | Click the Insert button in the control bar to fire this event. |
Default Action | Initiates any events associated with this event. |
Named Script | OnBeforeInsert |
Event Object Properties
Property | Description |
---|---|
returnValue | Boolean that denotes whether the Insert operation can be continued or not. |
true | Default. Insert operation should be continued. |
false | Insert operation should not be continued. |
srcElement | Reference to the Insert button. |
An event handler can access the event object and its properties through the eventObject available as a parameter on the handler.
Example
function beforeInsertHandler(eventObject) { if (EmployeesModel. soapFaultOccurred ) { alert("Cannot proceed with insertion. Previous transaction had failed! "); eventObject.returnValue = false; } }