Я создал запрос, подобный этому:
Теперь я хочу вызвать этот запрос внутри моего runBaseBatch
класса:
class Exercise_RunbaseBatch extends RunBaseBatch
{
private void customerLookup(FormStringControl _control)
{
SysTableLookup sysTableLookUp;
QueryBuildDataSource qbds;
Query query = new Query();
qbds = query.addDataSource(tableNum(CustTable));
sysTableLookUp = SysTableLookup::newParameters(tableNum(CustTable), _control, true);
sysTableLookUp.addLookupfield(fieldNum(CustTable, AccountNum));
sysTableLookUp.parmQuery(query);
sysTableLookUp.performFormLookup();
}
public Object dialog()
{
DialogRunbase dialog = super();
DialogRunBase dialogLookUP = super();
FormBuildStringControl control;
DialogField dialogField = new DialogField(dialog);
DialogField dialogFieldLookUp = new DialogField(dialog);
dialogFieldLookUp = dialog.addField(extendedTypeStr(AccountNum));
control = dialogFieldLookUp.control();
dialogField = dialog.addField(extendedTypeStr(LogisticsAddressCountryRegionId));
control.registerOverrideMethod(methodStr(FormStringControl, lookUp),methodstr(Exercise_RunbaseBatch, customerLookup),this);
return dialog;
}
public boolean runsImpersonated()
{
return true;
}
public boolean showQueryValues()
{
return true;
}
public static Exercise_RunbaseBatch construct()
{
return new Exercise_RunbaseBatch();
}
public boolean canGoBatch()
{
return true;
}
public static void main(Args args)
{
Exercise_RunbaseBatch runBaseDemo = Exercise_RunbaseBatch::construct();
runBaseDemo.getLast();
if(runBaseDemo.prompt())
runBaseDemo.run();
}
public void run()
{
super();
}
}
Как я могу это сделать?