Official Content

Executes something equivalent to what happens when you type an identifier value in a Transaction Form and exit the field. All the data corresponding to that identifier are loaded into memory (in this case in a variable based on a Business Component).

Syntax

&VarBasedOnBC.Load(PKAttri1, ..., PKAttriN)

Where:
&VarBasedOnBC
      Is a variable defined in a GeneXus object, based on a Business Component.

PKAttri1, ..., PKAttriN
      Are the values that make up the Primary Key of a Transaction first level.
      It must be a valid value for the Primary Key of the Transaction set as a Business Component and the &VbleBasedOnBC variable was defined based on it.


Samples

  &Customer.Load(10)
  &Customer.CustomerEmail = 'jsmith@gmail.com'
  &Customer.save()
  commit

The above code loads in memory a Customer by applying the Load method to the variable based on the Customer Business Component data type. Then, the next line of code modifies the Customer email by assigning a certain value to the &Customer.CustomerEmail property. The third line of code updates physically the record (by applying the Save method to the variable). Finally, the Commit command is executed (which is indispensable).


See Also

Error handling in Business Components





 




Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant