Hi,
as I found you need to define 3 arguments to make this work.
1. define next_persid :
ahdframeset.top_splash.next_persid = "<SOME_PERSID>";
i'm using this while creating child objects, so persid were parents persistent id.
2. update SET.id on form:
var set_id = main_form.elements["SET.id"];
set_id.value = "HTMPL=show_main_detail.htmpl&SET.id=" + "$args.id";
set_id.name = "INPUT_FIELDS_TO_PARSE";
To get more info, please refer to detailSave() function.
Here is complete function that I'm using on my forms :
function setAutoClose() {
if (_dtl.edit) {
var set_id = main_form.elements["SET.id"];
set_id.value = "HTMPL=show_main_detail.htmpl&SET.id=" + "$args.id";
set_id.name = "INPUT_FIELDS_TO_PARSE";
ahdframeset.top_splash.next_persid = "z_mi_rep:" + argParentID;
}
}
...
<BODY class="detailro" onunload="unloadActions();" onload="setAutoClose();">
Regards,
cdtj