web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Under review by Community Managers

Under review

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

Report as Finished Journal

Posted on by 69
Hi community, 

   I need to update the production order status from started to Report as Finished
//[SysODataActionAttribute("YSReportAsFinished", false)]
//public static void YSReportAsFinished(ProdId productid)
//{
//    ProdTable               prodTable;
//    ProdParmReportFinished  prodParmReportFinished;
//    ProdUpdReportFinished   prodUpdReportFinished;
//    prodTable = ProdTable::find(productid, true);
//    if (!prodTable)
//    {
//        throw error(strFmt(
//        "Production order %1 not found.",
//        productid));
//    }

//    if (prodTable.ProdStatus != ProdStatus::StartedUp)
//    {
//        throw error(strFmt(
//        "Production order %1 must be in Started status. Current status: %2",
//        productid,
//        enum2Str(prodTable.ProdStatus)));
//    }
//    ttsbegin;

//    prodParmReportFinished.clear();
//    prodParmReportFinished.ParmBuffer::initParmId();
//    prodParmReportFinished.initParmDefault();
//    prodParmReportFinished.initFromProdTable(prodTable);
//    prodParmReportFinished.ProdId  = productid;

//    prodParmReportFinished.QtyGood =
//    ProdUpdReportFinished::proposalQtyGood(productid);
//    prodParmReportFinished.EndJob  = NoYes::No;
//    prodParmReportFinished.PostNow = NoYes::Yes;
//    prodParmReportFinished.insert();

//    prodUpdReportFinished =
//    ProdUpdReportFinished::newParmBuffer(prodParmReportFinished);
//    prodUpdReportFinished.run();
//    ttscommit;
//}
I have used this code, however it is created and posted the RAF journal for formula only not for coproduct or a byproduct

I need a journal which is replicated a standard behaviour

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 1,093

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 193 Super User 2026 Season 1

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 148 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans