Skip to main content

Posts

Showing posts from March, 2019

ERP Comparison : AX 2012 Vs. Oracle Vs. SAP

Microsoft Dynamics 365 Finance and operations

Upgrade yourself to Dynamics 365 Jupiter Dynamics

Upgrade yourself to Dynamics 365...!! Learn the most demanded ERP course by real time with hands on experienced consultants...!!

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 = '';

Code Sample to Export Assets Master Table Value to CSV in Axapta

This Code Sample to Export Assets Master Table Value to CSV in Axapta. You can take many columns and value from table . This is just an example. Query q; QueryBuildDataSource qbds; QueryBuildRange qbr; QueryRun qr; CommaIO commaIO; FileName fileName; InventTable inventTable; AssetTable AssetTable; ; fileName = "C:\\TestSupport\\" + "ItemDetails1" + ".csv"; //Destination of the file commaIO = new CommaIO(fileName,'W'); q = new Query(); qbds = q.addDataSource(tablenum(AssetTable)); qbr = qbds.addRange(fieldnum(AssetTable,Assetid)); //Range qr = new QueryRun(q); commaIO.write("ItemId","Item Type"); //Header of the CSV File //Loop to insert values in the csv from the table while( qr.next() ) { AssetTable = qr.get(tablenum(AssetTable)); commaIO.write(AssetTable.AssetId,enum2str(AssetTable.AssetType)); break; } WINAPI::shellExecute(fileName);