Hi everyone,
I want to delete a line in "InventDim" table, and also update fields 'inventBatchId' and 'InventSerialId' in another line it "InventDim" table with X++.
But it doesn't update or delete this table. Could anyone advise why? And how can I delete from / update "InventDim" table?
My code is as bellow:
ttsBegin;
select forUpdate inventDim
where InventDim.inventDimId == _delDimId;
if(inventDim)
inventDim.delete();
while select forUpdate inventDim
where InventDim.inventDimId == _lastDimId
{
inventDim.inventBatchId = _newBatch;
inventDim.inventSerialId = _newSerial;
inventDim.update();
}
ttsCommit;
Thanks in advance