How to Insert and/or Update record levels of a transaction in Native Mobile

Traditionally, the standard design provided by WorkWith for GeneXus SmartDevices is not the most attractive for working with levels.


We suggest making some modifications to have a more attractive design.


For each level, add an Insert button

 

In the case of each level, you add the call to a Panel that will be created previously, passing the PK of the transaction as a parameter.

 

 

 

Each of these panels will have variables based on the level's attributes.

It will also have a 'Save' and 'Cancel' button.

 

 

 

For the level to be saved, a previously created procedure will be called, passing the Primary Key as parameters in addition to the values that will be inserted in the level.

 

 

The procedure will receive the values by parameter and with the New command, the values will be inserted in the database, closing with a commit.

 

Wiki GeneXus: New command

 

 

After executing the procedure, it returns to the screen with the transaction record details, passing the primary key as a parameter.

 

 

 

Below you will find an XPZ that was used as an example.

WorkWithDevices Cliente Example