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

NPRao
15th March 2007, 19:43
Refer to the links - Synchronized Dialog (http://www.baanboard.com/baanboard/showthread.php?t=31747&highlight=MMT)

AFS for Session Multi Main Table (http://www.baanboard.com/baanboard/showthread.php?t=28601&highlight=MMT)

bigjack
16th March 2007, 05:14
Hi NP Rao,

As per your post, i understand that AFS doesnt work with MMT sessions. I just want to know if it is officially documented or its a fact based on your observations as i need to convince my customer :confused:

Bye

NPRao
19th March 2007, 19:57
I could not find in any documentation that it doesn't work. I checked with BaaN Support and got the clarification - AFS does not work with MMT
I recommend you to contact your local BaaN Support if you need any official statements for your client/customer.

_Ralph_
6th April 2007, 16:18
It's true.

AFS does not works on MMT session.

If you think about the logic... When u input a field u're working with more than on session at the same time. thats the problem.

sometimes works if you open each session of the MMT individually but that a lot of work.

hope it helps