The VPMDataHandlerBusinessRules class is a non-visual custom class that contains methods into which you can enter data-related business rules code that is executed during data handling processes that occur when forms are run.
Business Rules Methods
The following table lists and describes the Business Rules class methods available to you. Study the methods to learn where you can use them in your application development.
· Function: The Function column groups the methods according to the data handling function to which they belong.
· Run Order: Within a Function the methods are listed in the order in which they are run when the Data Handler performs their data handling function.
· Comments: The Comments column describes the method and provides suggestions for its use.
|
Function |
Method |
Comments |
|
Add Record |
PreAdd |
Called by the data handler object’s AddRecord method before the addition of a record. If this method returns .F., the addition of the record is cancelled. Parameters: stcRulesID, stoCallingObject |
|
Add Record |
PostAdd |
Called by the data handler object’s AddRecord method after a record has been created. If this method returns .F., the addition of the record is rolled back (the new record is removed/deleted). Parameters: stcRulesID, stoCallingObject |
|
Copy Record |
PreCopy |
Called by the data handler object’s AddRecord method before the copying of a record. If this method returns .F., the copying of the record is cancelled. Parameters: stcRulesID, stoCallingObject |
|
Copy Record |
PostCopy |
Called by the data handler object’s AddRecord method after a record has been copied. If this method returns .F., the copying of the record is rolled back (the copied record is removed/deleted). Parameters: stcRulesID, stoCallingObject |
|
Delete Record |
PreDeletePreTransaction |
Called by the data handler object’s DeleteRecord method before the deletion of a record. If this method returns .F., the deletion of the record is cancelled. Parameters: stcRulesID, stoCallingObject |
|
Delete Record |
PreDelete |
Called by the data handler object’s DeleteRecord method before the deletion of a record. If this method returns .F., the deletion of the record is cancelled. Parameters: stcRulesID, stoCallingObject |
|
Delete Record |
PostDelete |
Called by the data handler object’s DeleteRecord method after the deletion of a record. If this method returns .F., the deletion of the record is rolled back (the deleted record is undeleted). Parameters: stcRulesID, stoCallingObject |
|
Delete Record |
PostDeletePostTransaction |
Called by the data handler object’s DeleteRecord method after the deletion of a record. Parameters: stcRulesID, stoCallingObject |
|
Restore Record |
PreRestore |
Called by the data handler object’s RestoreRecord method before the restoring of a record. If this method returns .F., the restore is cancelled. Parameters: stcRulesID, stoCallingObject |
|
Restore Record |
PostRestore |
Called by the data handler object’s RestoreRecord method after restoring a record. Parameters: stcRulesID, stoCallingObject |
|
Save Record |
PreSavePreTransaction |
Called by the data handler object’s SaveRecord method before the saving of a record. If this method returns .F., the save is cancelled. Parameters: stcRulesID, stoCallingObject |
|
Save Record |
PreSave |
Called by the data handler object’s SaveRecord method before the saving of a record. If this method returns .F., the save is cancelled. Parameters: stcRulesID, stoCallingObject |
|
Save Record |
PostSave |
Called by the data handler object’s SaveRecord method after the saving of a record. If this method returns .F., the saving of the record is rolled back. Parameters: stcRulesID, stoCallingObject |
|
Save Record |
PostSavePostTransaction |
Called by the data handler object’s SaveRecord method after the saving of a record. Parameters: stcRulesID, stoCallingObject |
|
Field Validation |
PreFieldValidation |
Called by the data handler object’s FieldValidation method before the validation of a field value. If this method returns .F., the code in this method determines what value and message is returned by the FieldValidation method. Parameters: stcDatabase, stcTableOrView, stcField, stValue, stcRulesID, stoCallingObject |
|
Field Validation |
FieldValidation |
Called by the data handler object’s FieldValidation method when validating a field value. If this method returns .F., the code in this method determines what value and message is returned by the FieldValidation method. Parameters: stcDatabase, stcTableOrView, stcField, stValue, stcRulesID, stoCallingObject |
|
Field Validation |
PostFieldValidation |
Called by the data handler object’s FieldValidation method after validating a field value. If this method returns .F., the code in this method determines what value and message is returned by the FieldValidation method. Parameters: stcDatabase, stcTableOrView, stcField, stValue, stcRulesID, stoCallingObject |
Calling the Business Rules Methods