I am afraid you will have to use some workarounds.
I am using an intermediate dialog object , pass the parameters needed to open the new document with javascript and X.CreateObjForm
and call the intermediate with XSupport.ExecS1Command (.net)
The problem is when you also need to pass the details dataset and when the way to construct it , is not a sql query, but it is at memory.
If this is the case, then you can try to use the XGlobal object to "send" the datasets and from the javascript in the target object , to populate them.