Martin,
I made you a small sample library (attached). It can also be opened using the Community Edition of Omnis Studio 11.1
Of course you can use a parameter to send information into the dialog form. However it becomes complicated if you want to re-load the detail form if something changes in the calling form. Ok – in that instance that cannot happen because the dialog form is modal.
But as soon as it gets a little bit more complicated – for example you want to send an entire row, it is much easier using an API. Also you cannot send any binary data (i.e. pictures). They would need to be converted into base64. However this is possible when sending messages.
I implemented a small API into the jsTest form that returns the entire row of the data list as well as in the other direction. That way you can also send information back to your calling form easily.
So when the user presses the “save” button in the dialog form it sends back the entire row into the container. You can see that when you change the street in the dialog and press the button.
For implementing a proper API you will soon realise that you always need the same methods, i.e. $getIdent, $setIdent etc. It might be clever to have a superclass which actually has those methods in place. That way every inherited class will have them already.
The example also shows how to pass the parameter properly. It shows it as a title above the fields.
I hope that makes sense.
Best,
Andreas