06 February 2014

Write data to text file in AX 2012 and AX 2009

static void writeDataToTxt(Args _args)
{

CustTable custTable;
BinData binData;
TextBuffer textBuffer;
;

textBuffer = new TextBuffer();
textBuffer.setText('');

while select custTable
{
textBuffer.appendText(strfmt('%1\r\n',custTable.AccountNum));
}

textBuffer.getText();

binData = new BinData();
binData.setStrData(textBuffer.getText());
binData.saveFile(@"C:\fileOUt\test.txt");

}

No comments:

Post a Comment

Give me the commetns and solutions

Ledger Voucher creation Framework and x++ code to create ledger voucher

 Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension->...