Hi guys,
I added a button to a subgrid command bar to open a new related form as a centered dialog. Pictures underneath will guide you through the goal i am trying to achieve.
Here is my Opleiding form witch has Extra Kosts related to it. To add the related extra costs i have a subgrid in the Opleiding form.

When Clicking the default "New Extra Kost" button it will open a "New Extra Kost Form" in a new full page.
Notice that in this form the "Extra Cost Training" by default is filled in.

To have a better UX I added a button "New In Center Dialog" to the subgrid. This opens the form as a centered dialog.
Notice that in this form the "Extra Cost Training" by default is not filled in.

This is my javascript to show the centered dialog

I would need to pass the "Extra Cost Training" parent value to the centered dialog matching field within the javascript.
Anyone has a idea how to achieve this?
Best Regards,
Anthony