This post is machine-translated. The original post in german language can be found here.

Create a picking list for production order

The following job creates a picking list for a production order.

static void createPickingList(Args _args)
{
    ProdJournalCreateBOM prodJournalCreateBOM;

    prodJournalCreateBOM = ProdJournalCreateBOM::construct();

    prodJournalCreateBOM.parmProdId('P000188');
    prodJournalCreateBOM.parmJournalNameId(ProdJournalName::standardJournalName(ProdJournalType::Picklist, prodJournalCreateBOM.parmProdId()));
    prodJournalCreateBOM.parmTransDate(systemDateGet());
    prodJournalCreateBOM.parmBOMAutoConsump(BOMAutoConsump::Never);
    prodJournalCreateBOM.parmProposalAsConsump(NoYes::No);
    prodJournalCreateBOM.parmQtyCalc(5);
    prodJournalCreateBOM.parmConsumpProposal(ProdBOMConsumpProposal::Qty);

    prodJournalCreateBOM.run();
}

 

If the Header already exists, you can use the following Job:

static void createPickingList(Args _args)
{
    ProdJournalCreateBOM prodJournalCreateBOM;

    prodJournalCreateBOM = ProdJournalCreateBOM::construct();

    prodJournalCreateBOM.parmProdId('P000188');
    prodJournalCreateBOM.parmJournalId('00926');    // Bei bestehendem Journalkopf
    prodJournalCreateBOM.parmTransDate(systemDateGet());
    prodJournalCreateBOM.parmBOMAutoConsump(BOMAutoConsump::Never);
    prodJournalCreateBOM.parmProposalAsConsump(NoYes::No);
    prodJournalCreateBOM.parmQtyCalc(11);
    prodJournalCreateBOM.parmConsumpProposal(ProdBOMConsumpProposal::Qty);

    prodJournalCreateBOM.run();
}
These post applies to following version:
Dynamics AX 2012

 
 

 

 
 
 
Posts of the actual month
Dezember 2024
MoTuWeThFrSaSu
 1
2345678
9101112131415
16171819202122
23242526272829
3031 
 
© 2006-2024 Heinz Schweda | Imprint | Contact | German version | Mobile version
In order to provide you with better service, this site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.