ICT Builder
23rd March 2015, 11:01
Hi,
I have the following problem. Session tdsls4101m000 is a type 2 session. It's child dialog is also tdsls4101m000. I need to change data on the child, so I start stpapi.synchronize.dialog. On the child I can start a form command, and that works fine, but now the problem starts.
I can not use stpapi.update because it will freeze the process.
Also, using stpapi.end.session wil end the child, but leaves the type 2 session open. If again using stpapi.end.session to end the type 2 session, the process will freeze.
Has anyone have a solution on using AFS on a session in which main and child form have the same name?

This is my source.

stpapi.put.field("tdsls4101mtst", "tdsls401.orno", str.orno)
stpapi.put.field("tdsls4101mtst", "tdsls401.pono", str.pono)
stpapi.put.field("tdsls4101mtst", "tdsls401.sqnb", "0")
retval = stpapi.find("tdsls4101mtst", afs.melding)
if retval = 1 then
retval = stpapi.synchronize.dialog("tdsls4101mtst", "modify", afs.melding)
stpapi.get.field("tdsls4101mtst", "tdsls401.rdta", vg.date.1)
|* The form command will re-calculate tdsls401.rdta.
stpapi.form.command("tdsls4101mtst", 5, "calculate.delivery.date", afs.melding)
|* This goed fine. A new date has been calculated.
stpapi.get.field("tdsls4101mtst", "tdsls401.rdta", vg.date.2)
|* De stpapi.update will freeze the process. I have to kill the PID
retval = stpapi.update("tdsls4101mtst", 1, afs.melding)
|* Close child dialog.
stpapi.end.session("tdsls4101mtst")
|* The next end sesison will freeze. I have to kill the PID
stpapi.end.session("tdsls4101mtst")
endif
endif

mark_h
23rd March 2015, 17:15
Moved to the correct forum.

Is this LN? My question would be is when the sync dialog is executed do you have two separate process id's? I do not know enough to speculate, but on 4c4 sometimes the hanging process is because the afs session does not really have control.