RE: Cancel & Delete a Sales Order Packing Slip gives updateConflict Exception - Please help
Hi,
There are couple of things that need to be changed. If you delete the record from packingslipjour, it automatically deletes it from packingslipTrans as delete action of type cascade is defined on table CustPackingSlipTrans and no need to explicitly delete packingslipTrans. (Path: \Data Dictionary\Tables\CustPackingSlipJour\DeleteActions\CustPackingSlipTrans)
Next, write the statement packingSlipJour.reread() before delete statement and remove update while selecting the record and use following statements:
packingSlipJour.reread();
ttsbegin;
packingSlipJour.selectforupdate(true);
packingSlipJour.delete();
ttscommit;
Hope this helps you.