Posts

Showing posts with the label Sales order line

Create Sales Line Through Code AX X++ D365 Finance & Operations

public void createSalesLine(ItemId _ItemId, InventDimId _InventDimId, Qty _qty SalesId _salesId)     {         SalesLine                               salesLine;         InventTable                            inventTable;         InventDim                              inventDim;         InventLocation                       inventLocation;         InventItemBarcode                 inventBarCode;         SalesTable                               salesT...

Sales order creation from sales quotation through code AX 2012/D365 x++

public void createSalesOrder(FormDataSource _SalesOrderDS) { int recordsCount; SalesQuotationLine salesQuotationLine; SalesQuotationTable salesQuotationTable; SalesTable salesTable; SalesLine salesLine; NumberSeq numberSeq; boolean headerCreated = false; recordsCount = _SalesOrderDS.recordsMarked().lastIndex(); salesQuotationLine = _SalesOrderDS.getFirst(1); ttsbegin; while (salesQuotationLine) { try { if (!headerCreated) { salesQuotationTable = salesQuotationLine.salesQuotationTable(); salesTable.clear(); numberSeq = NumberSeq::newGetNumFromCode(SalesParameters::numRefSalesId().numberSequenceTable().NumberSequence); salesTable.SalesId = numberSeq.num(); salesTable.initValue(); salesTable.initFromSalesQuotationTable(salesQuotationTable); salesTable.S...