Save the master / detail view

Hello,

Do you have a piece of code (JS) that allows you to save a recording in a master / detail view from a main form?
I have two save buttons and some users forget to use the second button (in the detailed view)

Thanks

Hi Yannick, do you want to reload detail from master or insert data in detail?

It’s for insert detail.

This is my screenshot :

I want to use first button to save data in detail view.

Thanks

If you want to save the fields in detail from a button in Master it’s not possible from scriptcase as I know. You must use js to get the value by elements by id and then insert or update data.

You can do it with JS/jQuery.
You need to add (programatically) to the save button of the main form a function that triggers a click on the save button of the detail form.

Similar to this, except that the function should be pre appended to the save button of the master form and it should trigger a click on the save button of the detail form (use the browser inspection to get the elements names and parent relations):

1 Like

Thank you guys for reference