Skip to main content

Posts

Showing posts with the label Sample Code to create Free Text Invoice in Ax 2012

Sample Code example to create Free Text Invoice in Ax 2012

This is a sample Example of Code to create Free Text Invoice in Ax 2012. Variables you need to declare to complete code. ttsBegin; select custTable where custTable.AccountNum == '123'; custInvoiceTable.clear(); if (custTable.RecId != 0) { custInvoiceTable.OrderAccount = custTable.AccountNum; custInvoiceTable.modifiedField(fieldNum(CustInvoiceTable, OrderAccount)); custInvoiceTable.InvoiceId ='test04'; custInvoiceTable.insert(); lineNum = 0; } if (custInvoiceTable.RecId != 0) { custInvoiceLine.initFromCustInvoiceTable(custInvoiceTable); // LedgerDimension=Dimensionstorage::accountNum2LedgerDimension("30104000",LedgerJournalACType::Ledger); custInvoiceLine.LedgerDimension = LedgerDimension2;//5637146102; custInvoiceLine.Description = ''; custInvoiceLine.TaxGroup = '';