bigjack
15th March 2007, 06:50
I have gone thro' earlier posts on this topic but couldnt find any proper solution.
Ive a main display session(tssoc2110m000) which has a synchronised dialog session(tssoc2110m100). I want to update a value in this dialog session. Im taking all the necessary care to handle this dialog session. However i cant save the modified record. If i issue a save call to parent session(tssoc2110m000) the afs gives an error "Save action not permitted, use dialog session" and if i issue a call to dialog session(tssoc2110m100) the afs gives an error for "synchronized dialog not started".
Ive observed that the dialog session is started whenever i execute stpapi.synchronize.dialog() However the dialog session has a parent process id which is not that of display sesion i.e. the dialog session is not started as a child of display session. I wonder whether this has something to do with it. This behaviour is not observed whenever i run the sessions manually.
One more point - The dialog session is a MMT session.
Im attaching code for reference, Ive handled such scenarios for other sessions, but cant figure out the problem this time. Is it a bug in standard AFS, should i lodge a case for it?
Thnks.
stpapi.put.field("tssoc2110m000","tssoc210.orno",orno)
stpapi.put.field("tssoc2110m000","tssoc210.acln",str$(acln))
ret = stpapi.change.view("tssoc2110m000",err.msg)
stpapi.put.field("tssoc2110m000","tssoc210.orno",orno)
stpapi.put.field("tssoc2110m000","tssoc210.acln",str$(acln))
ret = stpapi.find("tssoc2110m000",err.msg)
if ret <> 1 then
message("Record not found")
else
ret = stpapi.mark("tssoc2110m000")
ret = stpapi.synchronize.dialog("tssoc2110m000","modify",err.msg)
if ret <> 1 then
message("Synchronisation failed!\n%s",err.msg)
else
stpapi.put.field("tssoc2110m100","tssoc210.cstp",cstp)
if stpapi.update("tssoc2110m100",1,err.msg) <> 1 then
message("Error in saving record\n%s",err.msg)
stpapi.recover("tssoc2110m100",err.msg)
else
endif
endif
endif
Ive a main display session(tssoc2110m000) which has a synchronised dialog session(tssoc2110m100). I want to update a value in this dialog session. Im taking all the necessary care to handle this dialog session. However i cant save the modified record. If i issue a save call to parent session(tssoc2110m000) the afs gives an error "Save action not permitted, use dialog session" and if i issue a call to dialog session(tssoc2110m100) the afs gives an error for "synchronized dialog not started".
Ive observed that the dialog session is started whenever i execute stpapi.synchronize.dialog() However the dialog session has a parent process id which is not that of display sesion i.e. the dialog session is not started as a child of display session. I wonder whether this has something to do with it. This behaviour is not observed whenever i run the sessions manually.
One more point - The dialog session is a MMT session.
Im attaching code for reference, Ive handled such scenarios for other sessions, but cant figure out the problem this time. Is it a bug in standard AFS, should i lodge a case for it?
Thnks.
stpapi.put.field("tssoc2110m000","tssoc210.orno",orno)
stpapi.put.field("tssoc2110m000","tssoc210.acln",str$(acln))
ret = stpapi.change.view("tssoc2110m000",err.msg)
stpapi.put.field("tssoc2110m000","tssoc210.orno",orno)
stpapi.put.field("tssoc2110m000","tssoc210.acln",str$(acln))
ret = stpapi.find("tssoc2110m000",err.msg)
if ret <> 1 then
message("Record not found")
else
ret = stpapi.mark("tssoc2110m000")
ret = stpapi.synchronize.dialog("tssoc2110m000","modify",err.msg)
if ret <> 1 then
message("Synchronisation failed!\n%s",err.msg)
else
stpapi.put.field("tssoc2110m100","tssoc210.cstp",cstp)
if stpapi.update("tssoc2110m100",1,err.msg) <> 1 then
message("Error in saving record\n%s",err.msg)
stpapi.recover("tssoc2110m100",err.msg)
else
endif
endif
endif