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

AXmodel file import in D365 F&O

 ModelUtil.exe -import -metadatastorepath=k:\aosservice\packageslocaldirectory -file=C:\Temp\DEST.axmodel