Re: Insert Record to InventSum and InventTrans
Thanks Joris,
But my Consultant want to do that I think he want to do something on that.
These are the scenario.
In SQL my Consultant delete the record in INVENTTRANS and INVENTSUM.
Then he want to put it back using Job in AX.
I have a valid SALESLINE record with InventTransID. No need to create new InventTransID when I push it back to INVENTTRANS and INVENTSUM also just push all the record to that table.
This is my sample job code do you think this is wrong? do I need to put some classes or methods?
static void Job24(Args _args)
{
SalesLine salesLine;
InventTrans inventTrans;
;
while select salesLine where
salesLine.SalesId == 'SO1208/0001'
{
select forupdate inventTrans;
inventTrans.InventTransId = salesLine.InventTransId;
inventTrans.ItemId = salesLine.ItemId;
inventTrans.Qty = salesLine.SalesQty;
inventTrans.insert();
}
}