3

I have two tables master and detail.

When I add a new record to master, after that I need to add records to the detail table.

Is it possible to have a form with tow "setSource()" methods ? Or do I have to make first one form, and then add a second with the ID of the first as parameter ??

Which can be the best approach ?

Thanks

AJM.MARTINEZ
  • 477
  • 2
  • 9

1 Answers1

2

yes, you can actually call form's setModel() several times in atk4.2 and it will import fields from appropriate model and will save them simultaneously within the same sql transaction.

romaninsh
  • 10,068
  • 4
  • 46
  • 70