Sample Code for Non-Intrusive Customization
The following code illustrates the GetBusinessFields, InitialValues, and ValidateComponent methods contained in the customization template file BLanguage.p.
/*
Procedure: GetBusinessFields
Description:
Return a list of public business fields of a business class.
Parameters:
input icReference
(business class or (query) method name)
output dataset tBusinessFields
(business fields)
output dataset tCustomRelation
()
output oiReturnStatus
(Return status of the method.)
*/
/**
PROCEDURE BLanguage.GetBusinessFields.before:
END PROCEDURE.
**/
/**
PROCEDURE BLanguage.GetBusinessFields.after:
END PROCEDURE.
**/
/*
Procedure: InitialValues
Description:
Add code here to initialize the calculated fields of a 'new' record (= a record that must be created in the application database) in a class temp-table.
Parameters:
input icTableName
(Name of the database table of which a record is created in the class temp-table.)
output oiReturnStatus
()
*/
/**
PROCEDURE BLanguage.InitialValues.before:
END PROCEDURE.
**/
/**
PROCEDURE BLanguage.InitialValues.after:
END PROCEDURE.
**/
/*
Procedure: ValidateComponent
Description:
Write here all tests on database update (new / modify / delete) that cannot be coded with a validation mask.
The type of update can be found in tc_status (N/C/D).
If you find incorrect data, you must write an entry in tFcMessages (using SetMessage) and set the return status of this method to either +1 or -1.
Return status +1 = data will still be accepted.
Return status -1 = data will not be accepted.
This method is run from SetPublicTables, before transferring the received data into the class temp-tables.
Parameters:
output oiReturnStatus
()
*/
/**
PROCEDURE BLanguage.ValidateComponent.before:
END PROCEDURE.
**/
/**
PROCEDURE BLanguage.ValidateComponent.after:
END PROCEDURE.
**/