Hi,
I'm using this code for Export CSV file through batch job but got the FileIOPermission error.
fileName = "\\sssdt-006\\ExportCSV\\" + "ItemDetails" + ".csv";
filepermission = new FileIoPermission(fileName, 'w');
commaIO = new CommaIO(fileName, 'r');
filepermission.assert();
q = new Query();
qbds = q.addDataSource(tablenum(InventTable));
qbr = qbds.addRange(fieldnum(InventTable,ItemId));
qr = new QueryRun(q);
commaIO.write("ItemId");
while (qr.next())
{
inventTable = qr.get(tablenum(InventTable));
commaIO.write(inventTable.ItemId);
commaIO.write(output);
}
CodeAccessPermission::revertAssert();
Thanks for the help in advance.
*This post is locked for comments