AX – D365FO – Append text in an existing file with TextIO Class

TextIo              textIo;
str                 sTempPath, sFileName;

sTempPath   = WINAPI::getTempPath();
sFileName   = dateTodayStr + "_CloseInactiveOrders.txt";

textIo      = new TextIo(sTempPath + sFileName, "A"); //Type "A" to append the text to an existing file

lineStr = 'Hello world';


These are the mode in which the file should be opened. Specify one the following:
R – Read
W – Write
A – Append (implies “W”)
T – Translate (text)
B – Binary

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s