Obsolete
| Parameter | Description |
|---|---|
| iOldRecord | The old record number |
| iNewRecord | The new record number |
Procedure New_Current_Record Integer iOldRecord Integer iNewRecord
By default, the New_current_record procedure does nothing. It is received during the save, delete, and clear operations. During a find/relate operation, the "origin" of the find receives this message unconditionally, while the updated (parent) DDOs only receive it if the Current_Record is changing. It is available as a hook by means of which you can do such things as keep track of a key value:
Procedure Construct_Object
forward send Construct_Object
set main_file to .....
Property Integer piOldId 0
End_Procedure // Construct_Object
Procedure New_Current_Record integer iOldRecord integer iNewRecord
forward send New_Current_Record iOldRecord iNewRecord
set piOldId to myTable.Key_Field
End_Procedure
Function Validate_Save returns Integer
integer iRecnum iOldId iRetVal
forward get Validate_Save to iRetVal
if iRetVal ;
function_return iRetVal
get Current_Record to iRecnum
get piOldid to iOldId
if ((iRecnum <>0) and (myTable.Key_Field <> iOldId)) ;
send Operation_Not_Allowed 301 // custom error message
End_Function // Validate_Save