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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Unanswered

Report as Finished Journal

(0) ShareShare
ReportReport
Posted on by 61
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
I have the same question (1)

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 220 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 142 Super User 2025 Season 2

#3
Sagar Suman Profile Picture

Sagar Suman 58 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans