class RunBaseDemo extends RunBaseBatch
{
}
client server static ClassDescription description()
{
return "Mark on-hold";
}
public void run()
{
CommaIo io;
str TodayDate;
str strfilename;
str fileName;
TransDate _transDate;
_transDate = systemDateGet();
strfilename = "QL Item Update.csv";
fileName = @"C:\Sample\";
startTime = str2time("12:00:01 am"); //GMT, NOT user time zone - this is how stored in the table
endTime = str2time("11:59:59 pm");
rangeStart = DateTimeUtil::newDateTime(_transDate,startTime);
rangeEnd = DateTimeUtil::newDateTime(_transDate,endTime);
io = new CommaIo(strFmt("%1//%2", filename, strfilename), 'W');
io.outFieldDelimiter(",");
io.outRecordDelimiter('\r\n');
io.write('Item Number','Sell UPC','Description','Size','Color');
while select inventTable where inventTable.createdDateTime >= rangeStart &&
inventTable.createdDateTime <= rangeEnd
{
io.write(inventTable.ItemId,retailInventTable.getDefaultBarcode(),ecoResProductTranslation.Name,inventTable.StandardInventSizeId));
}
info(strFmt("File %1 created in specified folder.", fileName + strfilename));
}
static void main(Args _args)
{
RunBaseDemo objClass = new RunBaseDemo();
//prompt for runbase framework dialog
if (objClass.prompt())
{
//run the process
objClass.run();
}
}