Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Posting a production order pick list with serialized items from code

Posted on by 1,875

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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans