Experts,
I want to post a serialized items pick list from X++. Please let me know how i can pick the serial number for that specific item and reserve it before i post it. Below is my code
prodtable = ProdTable::find("Prod-000597");
if(prodtable){
while select * from prodjournaltable where prodjournaltable.ProdId == prodtable.ProdId
{
while select * from prodjournalbom where prodjournalbom.JournalId == prodjournaltable.JournalId
{
inventMovement = InventTrans::findTransId(prodjournalbom.InventTransId,true).inventMovement();
inventTrans = InventTrans::findTransId(prodjournalbom.InventTransId);
inventdim = InventDim::find(prodjournalbom.InventDimId);
reservation = InventUpd_Reservation::newMovement(inventMovement,30,false,false,false,0);
reservation.updateNow();
prodJournalCheckPost =
ProdJournalcheckPostBOM::newJournalCheckPost
( true, // _autoBlock
true, // _showInfoResult
JournalCheckPostType::Post, //_journalCheckPostType
prodJournalTable.tableId, //_tableId
prodJournalTable.journalId // _journalId
);
prodJournalCheckPost.run();
}
}else{
info("Production Order Not found");
}
Thanks In Advance
*This post is locked for comments