admin 1/3/2024 | |
Like I said before, the only way to do that is to use beforeSave event of master record, go through the whole list of records to be added and do something with the result: |
S
|
spin author 1/29/2024 |
Thanks for the reply, Sergey. |
fhumanes 1/30/2024 | |
Hi @spin: In an example of mine from Master-Detail, I have included the trace that I explain in this article and that serves to debug applications. I have since I built a trace in the After Added of the Master (Invoice) and the Detail (Invoice Line) and this is the trace that generates me: [Tue, 30 Jan 2024 12:12:22 +0100] Error 1: URL ejecutada: /invoice/factura_add.php As you can see, the Master's After Added event is the last thing that runs. You can do this same test with your example. Greetings, |
S
|
spin author 1/30/2024 |
Hi @fhumanes, thanks for the reply. My code (I simplified it) looks like this: function Master_AddPage_AfterRecordAdded($values) This code never finds any detail records, indicating that they are always added to the database after the AfterRecordAdded event of the master table. |
admin 1/31/2024 | |
The correct approach here is to redirect the user to the View page of the record that was just added. On that page you can have access to both master and details data. If you want to access details data right on the Add page in Javascript, you need to use jQuery. I attach a couple of screenshots that explain what you are looking for.
|
S
|
spin author 2/1/2024 |
Details data processed successfully, thanks @admin! |