i have problem with definitions created dialog
i put this code below it's was working on ax2009 but in ax2012r3 not wroking give me error on line 122
and when i press button dialog show me this
what solve of this problem
void clicked()
{
Dialog dialog;
DialogField dialogFileName;
SysOperationProgress simpleProgress;
Filename filename;
FileIOPermission permission;
TextIO textIO;
NumberSeq numSeq;
InventJournalTrans_Tag inventJournalTrans_Tag;
InventItemBarcode inventItemBarcode;
str s11,fileExtion ;
str 30 barcodestr;
container filterCriteria,tmpFilename;
int I,noexit;
InventDim inventDim;
InventJournalTable inventJournalTable ;
InventBatchSerialId inventBat;
Container c1,c2;
#File
#avifiles
;
dialog = new Dialog("@SYS28609"+"@SYS28426"+"@SYS26401"+" "+"@SYS15896");
dialogFileName = dialog.addField(typeid(FilenameOpen),"@SYS53125");
filterCriteria = ['*.txt'];
filterCriteria = dialog.filenameLookupFilter(filterCriteria);
dialog.run();
if (dialog.run())
{
filename = dialogFileName.value();
if(!filename)
{
Global::info("@SYS102056");
throw Exception::Break;
}
else
{
tmpFilename=fileNameSplit(filename);
fileextion=conPeek(tmpFilename,3);
if(fileExtion!=".txt")
{
Global::info(strFmt("%1",conPeek(tmpFilename,3))+"@SYS75113");
throw Exception::Break;
}
}
}
else
{
throw Exception::Break;
}
permission = new fileIOpermission(filename,#io_read);
permission.assert();
textIO = new TextIO(filename,#io_read);
textIO.inFieldDelimiter(';');///Change the Delimeter if it is , or ; etc
simpleProgress = SysOperationProgress::newGeneral(#aviUpdate, 'Importing sales data',100);
if(textIO)
{
numSeq = numberSeq::newGetNum(InventParameters::numRefInventJournalId());
ttsbegin;
inventJournalTable.JournalId=numSeq.num();
inventJournalTable.JournalNameId=InventParameters::find(false).TagCountingJournalNameId;
if (!inventJournalTable.JournalNameId)
{
Global::info(strfmt("@SYS62961"));
throw Exception::Break;
}
inventJournalTable.initValue();
inventJournalTable.initFromInventJournalName(InventJournalName::find(inventJournalTable.JournalNameId));
inventJournalTable.Description=InventJournalName::find(inventJournalTable.JournalNameId,false).Description +"/"+PerImportSetting.Name;
inventJournalTable.JournalType=InventJournalName::find(inventJournalTable.JournalNameId,false).JournalType;
inventJournalTable.InventDimFixed=259;
inventJournalTable.insert();
ttscommit;
while(textIO.status() == IO_Status::Ok)
{
c1 = textIO.read();
s11 = conpeek(c1,2);
if(strlen(s11) > 1)
barcodestr=Conpeek(c1,2);
select firstonly InventItemBarcode
where inventItemBarcode.itemBarCode==barcodestr;
if(inventItemBarcode.itemId)
{
///
inventBat=Conpeek(c1,4);
if(inventBat!="" || inventBat!="0")
{
select firstonly inventDim
where inventDim.InventSiteId==PerImportSetting.InventSiteId &&
inventdim.InventLocationId==PerImportSetting.InventLocationId &&
inventdim.inventBatchId==inventBat;
Global::info(strfmt("@SYS54778",inventBat,barcodestr));
}
if(!InventDim.inventDimId)
{
select firstonly inventDim
where inventDim.InventSiteId==PerImportSetting.InventSiteId &&
inventdim.InventLocationId==PerImportSetting.InventLocationId;
}
///
/* select firstonly inventDim
where inventDim.InventSiteId==PerImportSetting.InventSiteId &&
inventdim.InventLocationId==PerImportSetting.InventLocationId;*/
ttsbegin;
inventJournalTrans_Tag.journalId=inventJournalTable.JournalId;
inventJournalTrans_Tag.initValue();
inventJournalTrans_Tag.inventDimId=inventDim.inventDimId;
inventJournalTrans_Tag.itemId=inventItemBarcode.itemId;
inventJournalTrans_Tag.transDate=PerImportSetting.TransDate;
inventJournalTrans_Tag.qty=Conpeek(c1,3);
inventJournalTrans_Tag.tagId=int2str(I);
inventJournalTrans_Tag.lineNum=i+1;
inventJournalTrans_Tag.emplId=PerImportSetting.emplId;
inventJournalTrans_Tag.insert();
simpleProgress.incCount();
simpleprogress.setText(strfmt("@SYS54782", i));
i++;
sleep(10);
ttscommit;
Global::info(strfmt( "%1,%2,%3,%4" ,inventJournalTrans_Tag.itemId,inventJournalTrans_Tag.itemName()
,inventJournalTrans_Tag.qty,barcodestr));
}
else
{ {
noexit++;
Global::info(strfmt("@SYS98071",barcodestr));
}
}
}
select forUpdate inventJournalTable
where inventJournalTable.JournalId==inventJournalTrans_Tag.journalId;
ttsbegin;
inventJournalTable.NumOfLines=i;
inventJournalTable.update();
ttscommit;
Global::info(strfmt("@SYS62960",inventJournalTable.JournalId,inventJournalTable.JournalType)+strfmt("@SYS54781",i,noexit));
}
}