aaguiar
8th July 2004, 21:48
Hello personal,
Somebody, has an example of exclusion of a purchase order using AFS. I did him this turning off the order but the return of the delete is zero. and the message is the following: Unable to delete; record being used in other table.
If I make it manually I don't have any problem, besides in the debug of the program he goes by the same routines.
here this the piece of the code regarding exclusion.
f4101m000.put.purchase_order(tdgdc011.orno.o)
retFind = f4101m000.find ()
if retFind = 1 then
retMark = f4101m000.mark(errorMessage)
if retMark then
apagarOrdemCompra ()
endif
else
tdgdcdll0001.logErroInterface (" Empresa/Ordem: " &
str$(tdgdc011.ncmp.o) &" /" &
str$(tdgdc011.orno.o) & " non encotrada ")
errorCode = f4101m000.get.last.message.code ()
retRecover = f4101m000.recover (errorMessage)
endif
endif
function apagarOrdemCompra ()
{
| #Routines to turn off the purchase Order
retDelete = f4101m000.delete(true,errorMessage)
if not retDelete then
tdgdcdll0001.logErroInterface (" Mistake to Turn off Ordem/Empresa GDC: " &
str$(tdgdc011.orno.o) &" /" &
str$(tdgdc011.ncmp.o) &"" & errorMessage)
errorCode = f4101m000.get.last.message.code ()
retRecover = f4101m000.recover (errorMessage)
endif
}
Somebody, has an example of exclusion of a purchase order using AFS. I did him this turning off the order but the return of the delete is zero. and the message is the following: Unable to delete; record being used in other table.
If I make it manually I don't have any problem, besides in the debug of the program he goes by the same routines.
here this the piece of the code regarding exclusion.
f4101m000.put.purchase_order(tdgdc011.orno.o)
retFind = f4101m000.find ()
if retFind = 1 then
retMark = f4101m000.mark(errorMessage)
if retMark then
apagarOrdemCompra ()
endif
else
tdgdcdll0001.logErroInterface (" Empresa/Ordem: " &
str$(tdgdc011.ncmp.o) &" /" &
str$(tdgdc011.orno.o) & " non encotrada ")
errorCode = f4101m000.get.last.message.code ()
retRecover = f4101m000.recover (errorMessage)
endif
endif
function apagarOrdemCompra ()
{
| #Routines to turn off the purchase Order
retDelete = f4101m000.delete(true,errorMessage)
if not retDelete then
tdgdcdll0001.logErroInterface (" Mistake to Turn off Ordem/Empresa GDC: " &
str$(tdgdc011.orno.o) &" /" &
str$(tdgdc011.ncmp.o) &"" & errorMessage)
errorCode = f4101m000.get.last.message.code ()
retRecover = f4101m000.recover (errorMessage)
endif
}