Automatic BC Behaviour in Web Panel

The possibility to emulate automatically the behavior related to insert, update, delete and display a record within a Business Component was added. After selecting one of the templates of the category 'create, modify and delete data', the following message will appear:

ABMTrn2

ABMTrn1

If you press 'Yes', the following things will occurr:

  • The Web Panel will have a parm rule, in which will receive the PK of the BC and the &Mode variable
  • The Enter Event will have the code in order to analyze the required variables, and if everything is ok save the changes (or make delete if you enter in delete mode). After making the save, it will call a subroutine 'After trn' which will make the Return and the commit commands.
  • In the Start Event, there will be code in order to load the record, and disable the fields when you are in display or delete mode.

So, just by creating a Web Panel, selecting a template of 'create data' and press 'Yes', you will have full behavior of insert, update, delete and display data. As usual, you will be able to add user code in any of the Event or subroutiines created, on top or on bottom of the code generated automatically by WorkWithPlus