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

InventTable delete action not working by code

$
0
0

Hello everybody,

I have a record on InvenTable, which is related to another record in InventJournalTrans.

In other words I have created an item and inserted it into an adjustment journal, which means there are all related record in InventTrans etc...

The issue I faced is the following:

If I try to delete the item from Released product form, standard delete action (Restricted) works properly, so i get the error "<table> cannot be deleted while dependent <table> exist..."

If I try to delete the item by code instead:

ttsBegin;
select forUpdate InventTable
where InventTable.ItemId == "xxx";
InventTable.delete();
ttsCommit;

the check is not performed and the record is deleted anyway.

I wonder why because I am using delete() method and not doDelete() method.

Has anyone faced this problem before?

Thanks

G


Viewing all articles
Browse latest Browse all 175888

Trending Articles



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