Job
- static void AutoSetStatusPD(Args _args)
- {
- ProdId myProdId;
- ProdTable myProdTable;
- ProdTable updateProdTable;
- ProdMultiSchedulingJob prodMultiSchedulingJob;
- ProdParmScheduling prodParmScheduling
- ;
- myProdId = NumberSeq::newGetNum(ProdParameters::numRefProdId()).num();
- ttsbegin;
- myProdTable.ItemId = "003022008175";
- myProdTable.ProdId = myProdId;
- myProdTable.InventDimId = "06-00000010";
- myProdTable.QtySched = 5;
- myProdTable.type().insert();
- ttscommit;
- prodParmScheduling = prodParmScheduling::findLast(myProdId, ProdSchedMethod::OperationScheduling);
- prodMultiSchedulingJob = ProdMultiScheduling::construct(ProdSchedMethod::JobScheduling);
- RunBaseMultiParm::initParm(prodMultiSchedulingJob); // to get ProdParmScheduling from sysLastValue (user specific standard parameters)
- prodMultiSchedulingJob.insert(myProdTable, prodParmScheduling);
- prodMultiSchedulingJob.run();
- info(strfmt("Create PD %1", myProdId));
- }
https://community.dynamics.com/ax/f/33/t/74235
ไม่มีความคิดเห็น:
แสดงความคิดเห็น