Records data functions

The BAM generates functions for working with various data code events that control various events such as insert, update, or delete at the row level.

Table 1. Records data events
Function Name Description
PUBLIC FUNCTION dataEvent_record_OnSelectRows( 
   sqlQuery STRING )
  RETURNS (STRING)
Function called prior to running the query to populate a business record array. You can use this code event to customize the query used to select rows for a business record.
PUBLIC FUNCTION dataEvent_record_BeforeInsertRow( 
   dataInsert record-type)
   RETURNS (INTEGER, STRING, record-type)
Function called before inserting rows.
PUBLIC FUNCTION dataEvent_record_AfterInsertRow( 
   errNo INTEGER, 
   errMsg STRING, 
   uniqueKey record-type)
   RETURNS (INTEGER, STRING)
Function called after inserting row.
PUBLIC FUNCTION dataEvent_record_BeforeUpdateRow(
   p_dataT0 record-type,
   p_dataT1 record-type )
   RETURNS (INTEGER, STRING, record-type, record-type)
Function called before updating row.
PUBLIC FUNCTION dataEvent_record_AfterUpdateRow(
   errNo INTEGER, 
   errMsg STRING, 
   uniqueKey record-type)
   RETURNS (INTEGER, STRING)
Function called after updating row.
PUBLIC FUNCTION dataEvent_record_BeforeDeleteRowWithConcurrentAccess( 
   p_dataT0 record-type)
   RETURNS (INTEGER, STRING, record-type)
Function called before deleting a row with concurrent access.
PUBLIC FUNCTION dataEvent_record_AfterDeleteRowWithConcurrentAccess( 
   errNo INTEGER, 
   errMsg STRING, 
   p_dataT0 record-type)
   RETURNS (INTEGER, STRING)
Function called after deleting a row with concurrent access.
PUBLIC FUNCTION dataEvent_record_BeforeDeleteRow(
   uniqueKey record-type)
   RETURNS (INTEGER, STRING, uniqueKey)
Function called before deleting a row.
PUBLIC FUNCTION dataEvent_record_AfterDeleteRow( 
   errNo INTEGER, 
   errMsg STRING, 
   uniqueKey record-type )
   RETURNS (INTEGER, STRING)
Function called after deleting a row.
PUBLIC FUNCTION dataEvent_record_OnDefaultValues( 
   currentRow record-type)
   RETURNS (record-type)
Function called to initialize the business record with default values.
PUBLIC FUNCTION dataEvent_record_OnComputedFields( 
   currentRow record-type INOUT)
Function called to manage the fields in the business record.