Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

How to delete from / update "InventDim" table with X++

$
0
0

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


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>