Business Component Check method

Official Content
This documentation is valid for:

This method can be applied to a variable based on a business component type of a Transaction object.

It performs the same validations that are carried out when the Save method is executed, but without updating the database (it performs a rollback to cancel any modification).

 

It is used when you want to validate data (and mainly to give feedback to the user) before actually updating the database.
 

Syntax

&VbleBasedOnBCType.Check()

Where:

&VbleBasedOnBCType
      Is a -temporary and local- variable defined in a GeneXus object, based on a Business Component type of a Transaction.

 

Specific case: Delete.Check

In order to validate if a delete action can be performed, the Allow non-standard functions property must be set to True.

&Country.Load("uru")
&Country.Mode=TrnMode.Delete
&Country.Check()

if (&Country.Success())
   msg("Delete check ok", status)
else
   msg("Delete check fails", status)
endif

See Also

Business Component Save method