Hi,
I am generating a TextStreamIO file and saving it as a CSV file attachment. I am planning to use tab as delimiter. I cannot use comma as a delimiter as one of my table field values has commas in its data. I am inserting all table fields value in a container.
But the code I am writing is not populating the data properly. All the table fields info is getting populated in the first column of CSV file rather than each table field info getting displayed in each column.
public class xxxxxxxService
{
xxxxxxxContract contract;
CustTrans currentTrans;
container custTrans;
TextStreamIo io;
System.IO.Stream stream;
}
private void initIO()
{
io = TextStreamIo::constructForWrite(65001);
statementAsOfDate = contract.parmToDate();
io.outFieldDelimiter(///);
}
protected void populateStreamline()
{
CustTable custTable = CustTable::find(currentTrans.AccountNum);
custTrans = [
custTable.PaymTermId, //Payment terms
currentTrans.TransDate, //invoice date
currentTrans.Invoice, //Invoice #
currentTrans.Txt, //Description
];
recordCount++ ;
io.writeExp(custTrans);
}