ram_baan
6th August 2010, 15:04
Hi All,
I am facing the problem while creating a purchase order through AFS. The error message "Editable Synchronized Dialog not started" is shown after the stpapi.insert command run.

Please find the below code for the creation of purchase order through AFS. Please guide me if any part of code is incorrect.

ret = stpapi.synchronize.dialog("tdpur4100m900","add",err.msg)
if ret then
stpapi.put.field( "tdpur4100m900", "tdpur400.otbp", "SUP000021")
stpapi.put.field( "tdpur4100m900", "tdpur400.cofc", "AT2")
ret = stpapi.insert( "tdpur4100m900", true, err.msg)
if not ret then
ret = stpapi.recover("tdpur4100m900",err.msg) endif
stpapi.end.session("tdpur4100m900")
endif


Quick Reply would be appreciated.

Thanks,
Rama.

Predator
7th August 2010, 08:29
Rama,

U can change the session (tdpur4100m000) form type to update and window type list windows , use this session create Purchase order Header (tdpur400) after that use the tdpur4101m000 to create PO line (tdpur401).

Or u can use the DAL to create PO header first and use the session tdpur4101m000 to create PO line information.

Regards,
Jimmy