static void ProductionReportAsFinishedJournal(Args _args)
{
Struct struct = new Struct();
DimensionDefault DimensionDefault;
container ledgerDimensions;
DimensionDynamicAccount offsetDimensions;
Args args;
container ledgerDimension;
InventDim inventDim;
ProdJournalRoute prodJOurnalRoute;
AxProdJournalTable header = new axProdJournalTable();
ProdJournalProd prodJournalProd;
ProdRoute prodRoute;
ProdRouteJob prodRouteJob;
ProdBOM prodBom;
ProdTable prodTable;
InventTable inventTable;
header.parmprodId("PRD_00004667");
header.parmJournalNameId("Finish");
header.save();
prodJournalProd.JournalId = header.prodJournalTable().JournalId;
prodJournalProd.ProdId = "PRD_00004667";
prodJournalProd.QtyGood = 2;
prodJournalProd.QtyError = 1;
prodJournalProd.ErrorCause = ProdErrorCause::Machine;
prodJournalProd.TransDate = today();
select prodTable where prodTable.ProdId == "PRD_00004667"
join prodBom where prodbom.ProdId == prodTable.ProdId
join inventTable where inventTable.ItemId == prodTable.ItemId;
prodJournalProd.InventTransId = prodBom.InventTransId;
prodJournalProd.ItemId = prodTable.ItemId;
prodJournalProd.InventDimId = prodTable.InventDimId;
prodJournalProd.PmfProductType = inventTable.PmfProductType;
prodJournalProd.insert();
}
{
Struct struct = new Struct();
DimensionDefault DimensionDefault;
container ledgerDimensions;
DimensionDynamicAccount offsetDimensions;
Args args;
container ledgerDimension;
InventDim inventDim;
ProdJournalRoute prodJOurnalRoute;
AxProdJournalTable header = new axProdJournalTable();
ProdJournalProd prodJournalProd;
ProdRoute prodRoute;
ProdRouteJob prodRouteJob;
ProdBOM prodBom;
ProdTable prodTable;
InventTable inventTable;
header.parmprodId("PRD_00004667");
header.parmJournalNameId("Finish");
header.save();
prodJournalProd.JournalId = header.prodJournalTable().JournalId;
prodJournalProd.ProdId = "PRD_00004667";
prodJournalProd.QtyGood = 2;
prodJournalProd.QtyError = 1;
prodJournalProd.ErrorCause = ProdErrorCause::Machine;
prodJournalProd.TransDate = today();
select prodTable where prodTable.ProdId == "PRD_00004667"
join prodBom where prodbom.ProdId == prodTable.ProdId
join inventTable where inventTable.ItemId == prodTable.ItemId;
prodJournalProd.InventTransId = prodBom.InventTransId;
prodJournalProd.ItemId = prodTable.ItemId;
prodJournalProd.InventDimId = prodTable.InventDimId;
prodJournalProd.PmfProductType = inventTable.PmfProductType;
prodJournalProd.insert();
}
Seems not function, I can't view the journal in the form.
ReplyDeleteCorrected
DeleteCan you sent corrected code
Deletehello,
Deletejournal not showing in the form and a number sequence error is being triggered when I try to access the lines.
Is there any code snippet to complete the cycle?
DeleteCreate Picking List (Without Posting)
Create Report as Finished Journal and Route Card
Post Report As Finished Journal
Thank you
can you have code for complete the cycle?
ReplyDeleteCreate Picking List (Without Posting)
Create Report as Finished Journal and Route Card
Post Report As Finished Journal
please send .
Thank you