在系统中被删除的purchTable 会被记录在PurchTabledelete里,通过下方法可取得:
_purchTable.data(conpeek(purchTabledelete.PurchTable,1));
在系统中被删除的purchLine会被记录在PurchLinedelete里,如下:
purchLinetmp.setTmp();
purchLineDelete = purchLineDelete::find(patPublishedPurchaseOrders.PurchId);
while (purchLineDelete)
{
if(!purchLineDelete.PurchLine ||typeof(conpeek(purchLineDelete.PurchLine,1)) != Types::Record)
{
warning("@SYS81657");
}
else
{
purchLineTmp.clear();
purchLineTmp.overwriteSystemfields(true);
purchLineTmp.data(conpeek(purchLineDelete.PurchLine,1));
purchLineTmp.doInsert();
}
next purchLineDelete;
}
然后就可以while select purchLineTmp 来对被删掉的purchorder所有line做处理。