SBX - Search With Button

SBX - Forum Post Title

Inventory transaction line without reference in Invent closing

Microsoft Dynamics AX Forum

Rahele Kakavand asked a question on 11 Oct 2018 4:56 AM

Question Status

Suggested Answer

Hi all

I have several  weighted average lines in the inventory transaction for specific items without any origin in the invent closing table. 

How can I delete it form the inventtrans table ? Because when I want delete it in the AOT show me different error .   

Reply
Raheel Khan responded on 11 Oct 2018 5:00 AM
My Badges

Please share the error you getting while deleting it in the AOT

Reply
Rustem Galiamov responded on 11 Oct 2018 8:15 AM

Is there the Reference field is filled?

Reply
Suggested Answer

Hi,

Can you share details of those transactions?

Why do you want to delete them?

Have you checked the settlements and the settlement report that you can generate from the closing and adjustment form?

Best regards

Ludwig

Reply
Rahele Kakavand responded on 14 Oct 2018 2:23 AM

Hi guys 

I have a problem recalculation. The system doesn't recalculate ( or closing) it and some of item.

I thought the issue was with these rows. 

This is a photo of transaction list for a product that has closing problem :

and also when I wanted delete it in the AOT, Show me below error :

then I enabled a negative inventory in the warehouse, then I could remove it from  the inventtrans table.

But my problem wasn't resolved and the recalculation isn't done. :(

BR \ Rahele

Reply
magic1949 responded on 14 Oct 2018 3:51 AM
My Badges
Suggested Answer

Recalculation is not the same as closing. Which are you using?

Reply

Hi Rahele,

When you say 'remove it from the inventtranstable' do you mean that you simply deleted that recorded?

Best regards,

Ludwig

Reply
Rustem Galiamov responded on 14 Oct 2018 12:55 PM
Suggested Answer

Hi Rahele!

Delete records from InventTrans table it's not a good idea.

Try to run this job to recalculate InventSum:

static void InventSumRecalc(Args _args)
{
    InventTable                 inventTable;
    InventSumReCalcItem         inventSumReCalcItem;
    
    ttsbegin;

    while select inventTable
        where inventTable.ItemId == "yourItemId"
    {
        inventSumReCalcItem = new InventSumReCalcItem(inventTable.ItemId, true, CheckFix::Fix);
        inventSumReCalcItem.updateNow();
    }

    ttscommit;
    info("done");
}
Reply
Rahele Kakavand responded on 15 Oct 2018 1:25 AM

Hi Ludwig

I did it in the test server.

I do not know why the recalculation and closing for these items is not done

Best Regards

Reply
Suggested Answer

Hi,

Can you share details of those transactions?

Why do you want to delete them?

Have you checked the settlements and the settlement report that you can generate from the closing and adjustment form?

Best regards

Ludwig

Reply
magic1949 responded on 14 Oct 2018 3:51 AM
My Badges
Suggested Answer

Recalculation is not the same as closing. Which are you using?

Reply
Rustem Galiamov responded on 14 Oct 2018 12:55 PM
Suggested Answer

Hi Rahele!

Delete records from InventTrans table it's not a good idea.

Try to run this job to recalculate InventSum:

static void InventSumRecalc(Args _args)
{
    InventTable                 inventTable;
    InventSumReCalcItem         inventSumReCalcItem;
    
    ttsbegin;

    while select inventTable
        where inventTable.ItemId == "yourItemId"
    {
        inventSumReCalcItem = new InventSumReCalcItem(inventTable.ItemId, true, CheckFix::Fix);
        inventSumReCalcItem.updateNow();
    }

    ttscommit;
    info("done");
}
Reply

SBX - Two Col Forum

SBX - Migrated JS