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 :
Finance | Project Operations, Human Resources, ...
Answered

Reset Production Order status to Created stage through X++ in Ax 2012R3 / D365 Finance & Operations

(0) ShareShare
ReportReport
Posted on by

Hi Everyone,

I need urgent help.

I want to reset the Production order through X++ to Created Stage.
I have written below job code in AX2012 R3 which was written on multiple blogs.
But when I try to run job facing below error,

"The status cannot be reset from Scheduled to Created on production PRD/18-19/003221 because of the parameter setup."
"Update has been canceled."

Can anybody suggest some solution on this?

Below is the logic written in Job

static void resetProductionOrder_TestJob(Args _args)
{

ProdId _prodId = "PRD/18-19/003221";
ProdMultiStatusDecrease prodMultiStatusDecrease;

ProdParmStatusDecrease prodParmStatusDecrease;

ProdTable prodTable;

Args args = new Args();

;


Try

{

ttsbegin;

prodTable = ProdTable::find(_prodId,true);

if (prodTable.ProdStatus > prodStatus::Created)

{

args.record(prodTable);

select prodParmStatusDecrease where prodParmStatusDecrease.ProdId == prodTable.ProdId;


if (!prodParmStatusDecrease.RecId)

{

prodParmStatusDecrease.clear();

prodParmStatusDecrease.initFromProdTable(prodTable);

prodParmStatusDecrease.WantedStatus = ProdStatus::Created;

prodParmStatusDecrease.ParmId = NumberSeq::newGetNum(CompanyInfo::numRefParmId()).num();

prodParmStatusDecrease.insert();

}

prodMultiStatusDecrease = prodMultiStatusDecrease::construct(args);

prodMultiStatusDecrease.initParmBuffer(prodParmStatusDecrease);

prodMultiStatusDecrease.parmId(prodParmStatusDecrease.ParmId);

prodMultiStatusDecrease.run();

}

ttsCommit;
info("Done");
}

Catch (Exception::error)

{

checkFailed(strFmt("Delete of Production order %1 is failed.", _prodId));

}

}

.Prod-Order-Error.png

Thank you in advance

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    303,653 Super User 2026 Season 1 on at

    Hi Rhushikesh,

    On the production parameters, you can specify which status changes are allowed or not and if you can skip a status or not. The x++ job is validating against these parameters. It is not bypassing them.

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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 613

#2
André Arnaud de Calavon Profile Picture

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

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 292 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans