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

Add comment
 
 

 

 
 
 
Posts of the actual month
Februar 2023
MoTuWeThFrSaSu
 12345
6789101112
13141516171819
20212223242526
2728 
 
© 2006-2023 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.