D365FFO – AX – X++ – Create and Post Purchase Order Invoice

Find below job to create and post purchase order in Dynamics AX 2012 Note: Referring contoso demo data, ‘CEU’ company static void CreatePOAndInvoice(Args _args) { PurchTable      purchTable;PurchLine       purchLine;VendTable       vendTable = VendTable::find(“3008”);AxPurchTable    axPurchTable;AxPurchLine     axPurchLine;PurchFormLetter purchFormLetter; //Create Purchase orderpurchTable.initFromVendTable(vendTable); axPurchTable = axPurchTable::newPurchTable(purchTable);axPurchTable.parmPurchaseType(PurchaseType::Purch);axPurchTable.parmDocumentStatus(DocumentStatus::PurchaseOrder);axPurchTable.parmAccountingDate(systemDateGet());axPurchTable.parmDeliveryDate(016\2012);axPurchTable.parmPurchStatus(PurchStatus::Backorder);axPurchTable.doSave(); //Create PurchLine for item 1000purchLine.initFromPurchTable(purchTable); axPurchLine = AxPurchLine::newPurchLine(purchLine);axpurchLine.parmItemId(“1000”);axPurchLine.parmPurchQty(10);axPurchLine.parmPurchPrice(100);axPurchLine.doSave(); //Posting PO Confirmation,I guess its mandatory//You cannot … Continue reading D365FFO – AX – X++ – Create and Post Purchase Order Invoice

D365FO – AX 2012: Confirm Purchase Order in X++

Purpose: The purpose of this document is to illustrate how we can confirm purchase orders in X++ using PurchParmTable table and PurchFormLetter class. Business requirement: Ability to confirm purchase order automatically. As of now Standard AX offers manual purchase order confirmation by clicking Procurement and sourcing > Common > Purchase orders > All purchase orders > Purchase > Generate > Confirm. Assumptions: The purchase order … Continue reading D365FO – AX 2012: Confirm Purchase Order in X++